think-orm
think-orm copied to clipboard
find没条件查询的时候返回null吗
比如我下面的代码
$this->where('1 = 1')->field(
[
'SUM(CASE WHEN point > 0 THEN point ELSE 0 END) AS positive_total',
'SUM(CASE WHEN point < 0 THEN point ELSE 0 END) AS negative_total',
]
)->find();//->select()->first();
如果不加where条件就会返回null,或者需要改用select查询
版本 v4.0.50
我记得 think-orm 3 不是这样哦,请问下是不是有问题