2009年2月3日星期二

[fw-db] $select->where with array

Hello,

I have an array with id's. So I want to select all those id's from a tabble.
Is this possible.
A little code:

$ids = array(5,7,15,12,27);

$model = new TestModel();
$select = $model->select();
$select->where('id = ?', $ids); // this is not working


I want to get SELECT * FROM tblTest WHERE id = 5 OR id = 7 OR id = 15 ...

Is this possible to do on a short way like I want?


-----
visit my website at http://www.phpscriptor.com/ http://www.phpscriptor.com/
--
View this message in context: http://www.nabble.com/%24select-%3Ewhere-with-array-tp21809885p21809885.html
Sent from the Zend DB mailing list archive at Nabble.com.

没有评论: