How to find multiple values ​​of Cake method PHP find ()? (Able)

Is there a way to make find () in CakePHP that translates to IN state? It seems that the find () methods use only one value to search.

I would like to do something like this:

$this->User->findAllById(array(1, 5, 7));

which converts SQL to something like:

SELECT * FROM users WHERE id IN (1, 5, 7);
+5
source share
1 answer
$this->User->find('all', array('conditions' => array('id' => array(1, 5, 7))));
+13
source

All Articles