ThinkPHP5中取得符合条件的数据条数

{{ time }}

示例代码如下

 $count = db('product')
     ->where('seller_id', 'eq', 20)
     ->count();
 echo $count;