On Feb 21, 6:14 am, himynameisjonas <[email protected]> wrote:
> Hi, im trying to do a paginate with two LIKE conditions example:
> "...WHERE table.name LIKE %foo% OR table.name LIKE %bar%.."
>
> But i can't make the pageinate function handle two LIKE with OR, it's
> always uses an AND instead.
>
> any solution?

For your paginate (or find) conditions, you could use something like:
array('or' => array('Model.field LIKE' => '%foo%', 'Model.field LIKE'
=> '%bar%'))

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