当统计一个有重复的字段可以用这个方法

$count = $model->where($map)->count('distinct(id)');

posted on 2017-07-18 11:29  caigan  阅读(197)  评论(0编辑  收藏  举报