Re: newbie how to update a row with 2 primary keys

2008-04-18 Thread .
nvm. i got it thx On Fri, Apr 18, 2008 at 2:16 AM, . [EMAIL PROTECTED] wrote: for habtm tables in general, how would you handle updates? or deletes? On Thu, Apr 17, 2008 at 7:47 AM, Baz [EMAIL PROTECTED] wrote: But wait... isn't food_categories with only 2 columns a HABTM table?

Re: newbie how to update a row with 2 primary keys

2008-04-18 Thread .
for habtm tables in general, how would you handle updates? or deletes? On Thu, Apr 17, 2008 at 7:47 AM, Baz [EMAIL PROTECTED] wrote: But wait... isn't food_categories with only 2 columns a HABTM table? Am I missing something here? --~--~-~--~~~---~--~~

Re: newbie how to update a row with 2 primary keys

2008-04-17 Thread grigri
CakePHP does not support composite primary keys. This has been discussed at length. Just add an auto-incrementing column to your table and make that the primary key [ change your primary key index to a unique index first ]. How do I delete a row? I cannot seem to do $this-FoodCategory-del($id)

Re: newbie how to update a row with 2 primary keys

2008-04-17 Thread Baz
But wait... isn't food_categories with only 2 columns a HABTM table? Am I missing something here? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

newbie how to update a row with 2 primary keys

2008-04-16 Thread .
I have a table foods_categories with columns: food_id and category_id (the primary keys are food_id and category_id) Let's say I insert the values (1,2) into this table. Let's say I want to update the row to (1,3). How would I update this row? Normally, if I implement the table with the columns