Monday 17 September 2012

Yii findbyattributes using IN Clause

How to use SQL IN clause based on Yii findbyattributes?

Solution:


put an array as an value for an specific attribute:
$model=new Model();
$result=$model->findAllByAttributes(array('Id'=>array(6,7,8,9)));

No comments:

Post a Comment