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.
我想使用 Yii 查询生成器执行以下查询
$sql = "select * from user where userid in (1,2,3,)"
请帮助..
所有你需要的如下
$data = Yii::app()->db->createCommand()->select('*')->from('user')->where(array('in', 'userid', array(1, 2,3)))->queryAll();