I am new to cakephp and I want to use the SQL IN statement in the find method, I have a word table.
my code is:
$this->Word->find('Word.wordid in (83,82)');
and this code will create this request:
SELECT `Userword`.`userwordid`, `Userword`.`userid`, `Userword`.`wordid`, `Userword`.`date`, `Userword`.`levelid` FROM `userwords` AS `Userword` WHERE `Userword`.`wordid` = (82)
but i need this request
SELECT `Userword`.`userwordid`, `Userword`.`userid`, `Userword`.`wordid`, Userword`.`date`, `Userword`.`levelid` FROM `userwords` AS `Userword` WHERE `Userword`.`wordid` IN (83,82)
how to get such a request (using the IN operator)
thanks.
find orm cakephp in-operator
aya
source share