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

发表于 2019-12-10 09:54:11 (UTC+0)

示例代码如下

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