Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我想以这种方式查询,等效的 CDbCriteria 方法或属性是什么
select * from tbl_data where id in(2,3,6,8)
我不确定要使用哪个属性。
提前致谢
尝试这个
$condInArr = array(2,3,6,8); $Criteria = new CDbCriteria(); $Criteria->addInCondition('id', $condInArr); $List = TblData::model()->findAll($Criteria);