Wednesday, March 25, 2009

Re: OR queries on the same field

Or replace "OR" by "IN":
'conditions' => array('Vote.user_id' => array(1, 2, 3))

On Mar 26, 1:47 am, RyOnLife <ryan.mckil...@gmail.com> wrote:
> Got it:
>
>             'conditions' => array('or' =>
>               array(
>                 array('Vote.user_id' => 1),
>                 array('Vote.user_id' => 2)
>               )
>             )
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: