Re: Cake php connection with MS Sql Server 2000

2009-05-29 Thread Braindead
Are you sure, that the connection settings are ok and the MS SQL server is running? You also have to change the security salt as the first message says. But I gues that this is not related to your SQL server problem. --~--~-~--~~~---~--~~ You received this message

Re: set and field of more words

2009-05-29 Thread fain182
i found the solution reading the code.. cake/libs/view/helpers/form.php: 635 $varName = Inflector::variable( Inflector::pluralize(preg_replace('/_id$/', '', $this-field())) ); thank you -- pietro --~--~-~--~~~---~--~~ You received this message because you are

Re: problem with cake console

2009-05-29 Thread paulos nikolo
Unfortunately the link is broken.it can't load the file.:( 2009/5/29 Sam Sherlock sam.sherl...@gmail.com I think you have not added cake to your path, anyway you don't need to alter the cake.bat file This screencast helped me set up cake console http://cakephp.org/screencasts/view/6 as a

Re: Count array

2009-05-29 Thread rich...@home
or count($this-data['Entry']) On May 29, 4:13 am, Marcelo Andrade mfandr...@gmail.com wrote: On Thu, May 28, 2009 at 11:05 PM, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: Whats the easiest way to count the number of items in an array? I use the data in the array so its more

Getting an undefined index on a containable - what am I doing wrong?

2009-05-29 Thread number9
I'm starting to get my head around the containable stuff, but am having problems with this. I have a simple view action, which shows an overview of a category and related tips. Tips belong to a Site. I.e. Category - Tip - Site. What I'm trying to do is show the site name in the table with the

Re: Involuntary logouts - WHY?

2009-05-29 Thread foldiman
Thanks. I've implemented this change and pushed another build for testing. Meanwhile, would the following setting in the core.php file have any effect? Configure::write('Session.start', true); Configure::write('Session.checkAgent', true); Do these have anything to do with the Auth component?

Re: Multiple Accounts w/ Multiple Users in one Cake app

2009-05-29 Thread number9
You sound as if you probably have more cakephp experience than myself, so feel free to disregard this, but you could perhaps make use of access control lists and authentication here. I have no experience of setting this up, but I'm assuming that all companies/employees will access a fairly

Re: problem with cake console

2009-05-29 Thread number9
This gives a brief overview: http://amarenderguda.blogspot.com/2008/12/set-path-for-cakephp-on-windows.html You need to restart for the change to take effect, and it is the path to the individual cakephp application. Also, something that I managed to get confused about when I was first

Re: Problem Uploading Flash

2009-05-29 Thread Arak Tai'Roth
Anyone able to help with this? On May 28, 7:29 am, Arak Tai'Roth nielsen.dus...@gmail.com wrote: So I have a problem uploading a flash video using MeioUpload in CakePHP. Here is my controller code for the add function:                 function add()                 {                        

Re: Forms with math computations and multiple buttons

2009-05-29 Thread Mark
i guess you use cake 1.1 as in 1.2 cake seems not to use $this-params['form'] (always an empty array) mark On 29 Mai, 03:43, espontaneo acohln...@gmail.com wrote: Thanks for answering my questions. The number helper is only for the view right? Can I use it on my component/controller? I have

Admin routing and i can't switch language...

2009-05-29 Thread kicaj
Hi, I create simple system for articles and multilanguage, everything is working perfectly:) But when i use admin routing for administartion site, i can't switch to other language then default, why? --~--~-~--~~~---~--~~ You received this message because you are

Re: Cake php connection with MS Sql Server 2000

2009-05-29 Thread Stinkbug
I haven't seen anyone ever comment that they actually figured out how to make this work. We attempted it, but there were all kinds of problems. First, trying to find a driver for linux that would allow us to make a connection through cake to SQL Server was a huge problem. We could manually

how can i make a paginate for products of one shop

2009-05-29 Thread islam4hak
hi how can i make the paginate for a products of a shop in the data base for example i now want to make a view function of the shopController function view($id) { $this-Shope-id = $id; $this-set('shope', $this-Shope-read()); $this-set('prod',

radio buttons and observeField

2009-05-29 Thread Ithaka
Hi everybody, I was just wondering if any has come across this or knows what i might be doing wrong. the problem: I have a couple of radio buttons, i am observing these radio buttons with ajax observeField. When clicked the radio buttons update a div which has a select box in it. I have

Re: Determine which database driver is being used

2009-05-29 Thread jperras
Determine which database driver is being used http://api.cakephp.org/class/model#method-ModelgetDataSource As for your custom query, it really depends. Cake does a lot for you, but sometimes it makes sense to drop down to the bare metal and write a custom query. -j. On May 28, 12:46 pm,

Re: Determine which database driver is being used

2009-05-29 Thread jperras
Determine which database driver is being used http://api.cakephp.org/class/model#method-ModelgetDataSource As for your custom query, it really depends. Cake does a lot for you, but sometimes it makes sense to drop down to the bare metal and write a custom query. -j. On May 28, 12:46 pm,

2 Models - one form

2009-05-29 Thread jgadbois
What is the preferred way for handling a form with elements for mutitple models? In my case, I'd like to have a form where you can add a Recipe with all of it's Ingredients (a recipe hasMany ingredients). How would I handle this? I'm new to CakePHP so I'm a little confused.

validation messages problems

2009-05-29 Thread jrsh...@googlemail.com
I keep getting the following message, after I have clicked 'add' on my form, when it is invalid in any way and when a submission is successful: Not Found Error: The requested address '/contacts/add' was not found on this server. On a successful submission the e-mail is sent, but it still

copying table data from one table to another in cakephp controller method

2009-05-29 Thread Darshan
hi, i am new to cakephp. i am working on a project in which we have two tables one is product and the other is product repository, both the tables have same structure. what i want to do is create a repository for product so that we don't have to put all product information again and again,

getNumRows()

2009-05-29 Thread PaulMan
Hello Everybody, On Product Model public $hasAndBelongsToMany = array('Category' ,'Catalog'); On Products_Controller $this-data=$this-Product-find('all',array('conditions'=array ('Product.active'=1),'limit'='100')); $this-Product-getNumRows() it returns 100 Products , this is OK but

Re: Moving a webapp from Windows to Linux

2009-05-29 Thread brian
On Thu, May 28, 2009 at 12:44 AM, ShiVik vikramvmalhotra1...@gmail.com wrote: Hello Brian I checked the include_path...its value is .:/opt/lampp/lib/php The problem is with the .: at the beginning. --~--~-~--~~~---~--~~ You received this message because you

Re: 2 Models - one form

2009-05-29 Thread Ithaka
Pretty simple Jgadbois, Here could be a little example of what u would want. (in cakephp 1.2) //this doesn't have to be so complicated but im just showing u the options of the create //function. create('Recipe'); would automagically bring you to the add action. echo $form-create('Recipe',

cakephp dependencies

2009-05-29 Thread dkT
Hi, Does cakephp depend on any third-party software or special php configurations? /Daniel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to

Re: cakephp dependencies

2009-05-29 Thread Gwoo
http://book.cakephp.org/view/28/Requirements --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to

Does CakePHP support Sqlite-3 yet?

2009-05-29 Thread Russ
Can anyone tell me if CakePHP 1.2 supports Sqlite-3? If not, is it reasonable to think that a CakePHP 1.3 will provide that support? I haven't been able to find out much information on this subject. I guess most people aren't using Sqlite. I thought it would be a great database to use when

Re: Handling minute and hour elements in forms

2009-05-29 Thread Bs
Thanks, the input fields work but cake still saves NULL values in the database in this case. The problem seems to be that only hour and minute get set but cake doesn't set any year, month or day informations in the datetime field. The result is a null value in my datetime column in mysql. My

Re: Handling minute and hour elements in forms

2009-05-29 Thread Bs
P.S.: Now i've tested it with a time column type and it worked!!! Thanks!!! On 27 Mai, 17:02, Stu greenmushroo...@gmail.com wrote: ps: The view code should look something like this: echo $form-dateTime('column_name', 'NONE', '12'); The '12' just represents the format, you can either choose

Setting a date-Field to default values

2009-05-29 Thread GetIT
Hi, I´m having a problem to set the values of a date-field. A little example: The table users: id, int(11), auto_increment, primary key today, date I know that this example doesn´t make sense, but it´s only a example. My Controller: ... $this-set('user', $this-user-read(null, $id) ... And

Re: Determine which database driver is being used

2009-05-29 Thread blake
Thanks for the suggestion, that worked out for me. I was disappointed to have to finally use a custom query, but it seemed necessary this time. I have to go about 3 levels deep through the models to get everything I need, which resulted in over 8000 queries per page of results. It was done the

user table with authenticate

2009-05-29 Thread Paco Gomez
Hello everybody, I've seen a lot of examples that use in controllers function like some_function($id) { ... } - How functions can receive user id authenticate automaticaly? - Is there any variable that store user table in the session? Thank you very much

Re: Handling minute and hour elements in forms

2009-05-29 Thread Bs
Now there's still one problem...sorry:) Saving to a mysql time field works. But in my edit view the time is not read from the mysql time field. -- probably because it's a datetime field in cake and cake wants a year, month, day? --~--~-~--~~~---~--~~ You received

Re: Auth component cache problem in Internet Explorer

2009-05-29 Thread jackb
I'm experiencing the same problem, but I have managed to isolate it to occur only when I'm making ajax requests that make use of parameters. That is, in Cake if I am using the $ajax helper and use the with option for a function to return a string, or if the request is created in javascript using

Re: 2 Models - one form

2009-05-29 Thread jgadbois
Thanks that helps a lot...I got it working. Now I have another problem :) I would like the user to add as many ingredients as he/she wants. Basically I have a link (Add another ingredient) that executes javascript and adds the new form fields. This is all working fine and saving to the db via

Re: cakephp dependencies

2009-05-29 Thread dkT
Thx Gwoo ;) On 29 Maj, 18:20, Gwoo gwoo.cake...@gmail.com wrote: http://book.cakephp.org/view/28/Requirements --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to

Re: getNumRows()

2009-05-29 Thread Miles J
Why would it be 3, if the rows are 100? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to

$ajax-form() and javascript validation

2009-05-29 Thread Celso
Hi! how can I do a simple validation in my form: echo $ajax-form('adicionar','post', array('model'='Cargo' , 'update'='ajax-mensagem' , 'complete'= Effect.Pulsate('ajax-mensagem'); , 'id' = 'form-inclusao'

find(list) doesn't bring back the user choice that is written in the database

2009-05-29 Thread simon...@gmail.com
Good Afternoon, I did create a listbox using find(list). It did write the choise 3 in the database. But when I want to edit this choice, it doesn't appear selected. I'm new to this function so I don't know if there is a method or something I should use in this function. Regards,

URL mapping of actions with camelCase names

2009-05-29 Thread smeenai
Hey all, just getting started with CakePHP and came across a small problem. I have a controller with a function named byName. I'm quoting http://book.cakephp.org/view/46/Routes-Configuration: /products/view_clearance maps to the viewClearance() action of the ProductsController However, when I

Test table creation failing

2009-05-29 Thread Leo Mendoza
Hey all - I'm trying to run a simple test, and CakePHP is failing when it tries to access a table it should be automatically creating. Like so: --- Missing Database Table Error: Database table test_event_admins for model EventAdmin was not found. Notice: If you want to customize this error

Re: URL mapping of actions with camelCase names

2009-05-29 Thread Pablo Viojo
Can you post the URL that allow to access and the URL that throws an error? (becuse I get lost! :) ) Saludos, Pablo Viojo pvi...@gmail.com http://pviojo.net (#260 y creciendo!) Ayudar nos hace felices! http://needish.com -

Routing an Admin dashboard

2009-05-29 Thread Beedge
Hi all, I have baked up a couple of simple controllers/models to add news stories and the like to an app I am building (for no other reason than to learn the ropes) I want the administrator to be able to type www.siteurl.ie/admin and be directed to a log in. I want there to be a dashboard with

Re: URL mapping of actions with camelCase names

2009-05-29 Thread Pablo Viojo
I defined this on my controller (TestingController): function by_name(){ echo by_name; die(); } function byName(){ echo byName; die(); } And the results are: /testing/by_name -- by_name /testing/byName -- byName If I set the following route

Re: Does CakePHP support Sqlite-3 yet?

2009-05-29 Thread Marcelo Andrade
On Fri, May 29, 2009 at 1:39 PM, Russ russ.chaf...@gmail.com wrote: Can anyone tell me if CakePHP 1.2 supports Sqlite-3? If not, is it reasonable to think that a CakePHP 1.3 will provide that support? Check this ticket. The attachment driver works fine. https://trac.cakephp.org/ticket/3003

Re: Problem with DISTINCT query....

2009-05-29 Thread brian
try this: $this-Invoice-findAll(null, array('DISTINCT Invoice.customer_id')); On Thu, May 28, 2009 at 1:58 PM, Matt mmanai...@gmail.com wrote: I am trying to get a distinct list of invoices based on the customer_id using the following line: $this-set('invoices',

Re: View Images

2009-05-29 Thread brian
Save the filename/path to a table? On Thu, May 28, 2009 at 3:53 PM, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: This is a simple question that has me stumped. A user uploads an image that gets saves to webroot/img/user/photos Now in the profile there is the thumbnails of the

Re: validation messages problems

2009-05-29 Thread brian
On Fri, May 29, 2009 at 10:52 AM, jrsh...@googlemail.com jrsh...@googlemail.com wrote: I keep getting the following message, after I have clicked 'add' on my form, when it is invalid in any way and when a submission is successful: Not Found Error: The requested address '/contacts/add' was

Re: user table with authenticate

2009-05-29 Thread brian
Can you post an example? What do you mean by authenticate? If you use the AuthComponent, you can get the ID from $this-Auth-user('id'). On Fri, May 29, 2009 at 1:21 PM, Paco Gomez paco.gomez.ar...@gmail.com wrote: Hello everybody, I've seen a lot of examples that use in controllers function

Re: View Images

2009-05-29 Thread adallas
I have the same problem. My solution is to build the url using the define FULL_BASE_URL (defined in CAKE/config/paths.php), and $this- webroot (where $this is a helper or a controller, but not a view), plus a webroot-relative literal. There doesn't seem to be a define for URL directory

Re: Saving record HABTM

2009-05-29 Thread adallas
I may not understand the situation clearly, but I have several HABTM relationships, and I don't have controllers for the association tables. Can you work from either the products or the assets controller? /alastair/ --~--~-~--~~~---~--~~ You received this

A collection of Coda clips for CakePHP

2009-05-29 Thread DanielMedia
Hi All, Just wanted to drop in and let anyone know who might be interested (And uses the Coda IDE) that I've put together a collection of clips for CakePHP. You can check them out here: http://code621.com/content/6/a-collection-of-coda-clips-for-cakephp Hope someone finds the collection useful

Re: Database and Model Design for HABTM

2009-05-29 Thread adallas
Your code looks right, but you could combine main and sub categories into a Category table that uses Tree behavior. Then a recipe would HABTM categories, and subcategories could have sub-subcategories. /alastair/ On May 28, 7:03 am, Luke eik...@hotmail.com wrote: Hi, I am still a Cake newbie,

Re: Feedback from TranslateBehavior creator needed

2009-05-29 Thread jitka (poLK)
There's ArticleVersion model, which have this fields: id, name: varchar, introduction:text, created:datetime. I've defined to name and introduction fields to be translatable: var $actsAs = array('Translate' = array('name', 'introduction')); Table for ArticleVersion model should not contain

Routes and AJAX

2009-05-29 Thread Dave Maharaj :: WidePixels.com
Do you have to do anything special when you have custom routes and calling an Ajax function? Trying to do something simple and no luck.update a div my routes take users/journals to /journals simply removing the users in the url Now on journals i want to load a entry (element) into a

Re: user table with authenticate

2009-05-29 Thread Ricky Paz
If you use AuthComponent, you can get id from $this-Auth-user('id) as said above, but functions like edit, view or delete, they receive $id from URL. Make a simple application from bake and look at the URL after click in edit. You'll see something like this: http://address/ {controllerName} /