Hi,

I have an array with some ids of a model and struggle with getting
them into a find condition.

This is what I currently use, it works but is not very caky:

$audioIds = array('1', '2', '3',....);
$audios = $this->Audioplaylist->Audio->find('all', array('conditions'
=> 'Audio.id='.implode(' OR Audio.id=', $audioIds)));

I think it should look like this the cake way:

$audios = $this->Audioplaylist->Audio->find('all', array('conditions'
=> array('Audio.id' => $audioIds)));

but this results in [...] AND `Audio`.`id`=Array [...]

I already had a look into the cookbook and played around alot, but
couldn't figure out a proper way, so I hope you can help me.

Thx,
Michael
--~--~---------~--~----~------------~-------~--~----~
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