@WebbedIT - Although that is correct, your example wont work. Simply
because you have conflicting indexes because they match, so 2 of them
would be overwritten. To fix this though you have to wrap them in an
array.

array(array('Post.title LIKE'=>'%mary%'), array('Post.description
LIKE'=>'%mary%'), array('Post.title LIKE'=>'%tom%'), array
('Post.description LIKE'=>'%tom%'))

On Sep 8, 1:24 am, WebbedIT <[email protected]> wrote:
> I reckon you glossed over Miles J's point without full consideration.
> Cake will do the OR work for you, consider ...
>
> $this->Post->find('all', array(
>   'conditions' => array(
>     'Post.status' => 0,
>     'Post.rank <=' => 0,
>     'OR' => $convertedSearchString
>   )
> ));
>
> All you need to do then is pass your comma separated query string
> through a function which returns
>
> array('Post.title LIKE'=>'%mary%', 'Post.description LIKE'=>'%mary%',
> 'Post.title LIKE'=>'%tom%', 'Post.description LIKE'=>'%tom%')
>
> You've got to agree this way is much simpler and cleaner, which is
> what using CakePHP is about.
--~--~---------~--~----~------------~-------~--~----~
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