This query only passes the user_id = 2 condition:
'conditions' => array('or' =>
array(
'Vote.user_id' => 1,
'Vote.user_id' => 2
)
)
This query passes both conditions as expected:
'conditions' => array('or' =>
array(
'Vote.user_id' => 1,
'Vote.id' => 2
)
)
What if you want to use the same field over and over again in an OR
condition?
Example:
user_id = 1 || user_id = 2 || user_id = 3
Thanks!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---