序:由于我们在查询数据时,常常会使用['eq','']或者array('eq','')的写法,查询数据无法获取想要的结果。以下方法完美解决了这个问题。
$where['name'] = array('exp', 'is null'); //为空的
$where['name'] = array('exp', 'is not null'); //不为空的
序:由于我们在查询数据时,常常会使用['eq','']或者array('eq','')的写法,查询数据无法获取想要的结果。以下方法完美解决了这个问题。
$where['name'] = array('exp', 'is null'); //为空的
$where['name'] = array('exp', 'is not null'); //不为空的