I think you want to use find 'id' IN (2,5,6,4,6,7,8);
$condition = array("id in (2,3,4,5,6,7,8)");
$this->Artist->findAll($condition);
Mike
On Sep 26, 11:35 am, Charlie van de Kerkhof <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> (v1.2, latest SVN version)
>
> I try to pass an array to the findAll function like this:
>
> $condition = array('id'=>array(2,5,6,9,12,45,78,43,76));
> $this->Artist->findAll($condition);
>
> But the Query is written to the database is:
> SELECT * from Artist WHERE (2) AND (5) AND (6) AND (9) AND (12) AND
> (45) AND (78) AND (43) AND (76);
>
> What results in returning every row because everything is true.
>
> Is this a bug or is this not supported (yet?)?
>
> Thnx!
> - Charlie
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---