Yii 条件 <IS NULL>
如何逐列查找空值?
它不起作用:
$criteria->condition = '`seller_id` IS NULL';
推荐答案
$criteria->addCondition('seller_id IS NULL');
$data= MODEL::model()->find($criteria);
试过了? **seller_id** 是 Yii 中映射的列名,它可能与您数据库中的实际列名不同.
tried this? **seller_id** is the mapped column name in Yii, it may not be same as the actual column name in your database.
相关文章