Reputation: 1701
What is the equivalent CDbCriteria method or properties if i want to query this way
select * from tbl_data where id in(2,3,6,8)
Im not sure as to which property to use though.
Thanks in advance
Upvotes: 0
Views: 92
Reputation: 4629
Try This
$condInArr = array(2,3,6,8);
$Criteria = new CDbCriteria();
$Criteria->addInCondition('id', $condInArr);
$List = TblData::model()->findAll($Criteria);
Upvotes: 2