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 id, food_id, and
category_id (the primary key is id), I can just do this->data['food]['id'] =
1. Then do the save (which will actually update).

So would it be better to have a single primary key "id"?

Thanks in advance...

Note: I am using cakephp 1.2

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to