I am trying to query a table to determine if the record exists as I do not
want duplicates but not sure if this is correct.
 
$results = $this->find('first', array('conditions' =>
array('Bookmark.user_id' => $user_id, 'Bookmark.post_id' => $post_id)));
debug($results);
 
so if the user_id and the post_id are in the same row then do not save the
bookmark because it already exists.
 
Is this right?
 
Dave 

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to