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