Re: CSV file as DataSource

2008-10-28 Thread su6z3r0
.html > > On Oct 27, 12:44 pm, su6z3r0 <[EMAIL PROTECTED]> wrote: > > > Hello, > > > I am trying to setup a csv file as data source. But I do not know how/ > > where I could dynamically change the file name of the csv file. In my > > below example the name &q

Re: CSV file as DataSource

2008-10-28 Thread su6z3r0
Aaarrglll... I was so close... Anyway. It works. You are my hero! Thank's dude. Alex On Oct 28, 4:20 am, ORCC <[EMAIL PROTECTED]> wrote: > Actually, it is (assuming your db configuration variable is called > "default"): > >  $conn =& ConnectionManager::getInstance() >  $conn->config->default['fi

CSV file as DataSource

2008-10-27 Thread su6z3r0
Hello, I am trying to setup a csv file as data source. But I do not know how/ where I could dynamically change the file name of the csv file. In my below example the name "email.csv" should actually be a file name which can be set up in the controller. the database.php contains: var $csv = a

Re: 1.2: Custom form validation error Message

2008-02-22 Thread su6z3r0
Thank you. Works very well! On Feb 22, 5:28 pm, grigri <[EMAIL PROTECTED]> wrote: > Check out my comment on the bakery: > (yes it's got code) > > http://bakery.cakephp.org/articles/view/multiple-rules-of-validation-... > > Should help you do what you need > >

1.2: Custom form validation error Message

2008-02-22 Thread su6z3r0
Hello, is there a way to ouput different error message depending on the result of the custom validation method? I am checking a field with a custom valdation method and depeding on the data entered there should be different messages. I.e. in the below code "message" => "Error" should be replaced

Re: can someone please explain to me what {n} is?

2008-02-14 Thread su6z3r0
{n} is a placeholder for numbered keys in arrays. So this would translate into something like [1]['Role']['id'] [2]['Role']['id'] [3]['Role']['id'] . . . Check this page: http://www.thinkingphp.org/2007/02/24/cake-12s-set-class-eats-arrays-for-breakfast/ Felix explains how tho use Set::extrac

Re: Tree Behavior: parent_id not saved

2008-02-13 Thread su6z3r0
There have been some typos in the script shown. I have submitted the corrections. On Feb 13, 3:46 pm, su6z3r0 <[EMAIL PROTECTED]> wrote: > Hi, > > I am trying the example athttp://book.cakephp.org/view/91/tree-behavior. > > When I save a new node the parent_id is missing i

Tree Behavior: parent_id not saved

2008-02-13 Thread su6z3r0
Hi, I am trying the example at http://book.cakephp.org/view/91/tree-behavior. When I save a new node the parent_id is missing in the INSERT. If I do a debug the parent_id is set but the INSERT just has left, right, and title values. Any ideas what I might be doing wrong? THX, Alex --~--~-

Re: Saving additional fields in HABTM tables ("With" Associations)

2008-01-30 Thread su6z3r0
Tulio, thank you for your reply. I guess your are proposing something which is explained here: http://www.thinkingphp.org/2006/10/26/modeling-relationships-in-cakephp-faking-rails-throughassociation/ However, my understanding was that it should now (cake 1.2) with HABTM and "with" associations.

Re: Saving additional fields in HABTM tables ("With" Associations)

2008-01-30 Thread su6z3r0
Here is what I am trying so far. http://bin.cakephp.org/view/1751195932 But this example only shows how to save the foreign keys in the HABTM table. But I have not found out yet how to populate additional fields. Any ideas? --~--~-~--~~~---~--~~ You received thi

Saving additional fields in HABTM tables ("With" Associations)

2008-01-29 Thread su6z3r0
Hello, I saw the example in the PDF (http://www.cakephp.org/files/OCPHP.pdf) but I don't get how the "date" field of the posts_tags table is populated. Also it is not quite clear to me what the beforeSave() method in this example does. Would you still use $this->data['Tag']['Tag'] = array($thi

Useing bake script to create models

2007-09-06 Thread su6z3r0
Hi guys, I am trying to use bake (v. 1.2 cake) to create models. The database setup is very easy for testing purposes: products: id details: id product_id Now what I expected when useing bake is that it detects the association "Product hasMany Detail" because of the nameing convention. But w

Useing bake script to create models

2007-09-06 Thread su6z3r0
Hi guys, I am trying to use bake (v. 1.2 cake) to create models. The database setup is very easy for testing purposes: products: id details: id product_id Now what I expected when useing bake is that it detects the association "Product hasMany Detail" because of the nameing convention. But w