Hi, I have a question about save() function. It doesn't trigger Update (instead it does Insert) when I want to update data.
When I tried to do the save(), i got a following message: ------------------------------ Query: INSERT INTO `2p_member_search_criterias` (`gender`,`reason`,`age_from`,`age_to`,`height_from`,`height_to`,`weight_from`,`weight_to`,`photo`,`member_id`) VALUES (1,'0',20,21,127,127,60,70,0,73) Warning (512): SQL Error: 1062: Duplicate entry '73' for key 1 ------------------------------ What could be a reason for that? There is an existing record with member_id = 73. And I just want to update some of its fields. Here is a data saving code: $data['MemberSearchCriteria']['member_id'] = $user_id; $this->MemberSearchCriteria->save($data['MemberSearchCriteria']); I have also specified which is a primary key in table for the "MemberSearchCriteria" model: var $primaryKey = 'member_id'; In addition, similar code works for other models and databases, except for this one. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
