Is there a way to do a find() in CakePHP that converts to an IN condition? It seems the find() methods just take a single value to search on.
I would like to do something like this:
$this->User->findAllById(array(1, 5, 7));
which would convert the SQL to something like:
SELECT * FROM users WHERE id IN (1, 5, 7);
$this->User->find('all', array('conditions' => array('id' => array(1, 5, 7))));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With