TinkPHP去重统计查询 当统计一个有重复的字段可以用这个方法 $count = $model->where($map)->count('distinct(id)'); 转自 http://www.thinkphp.cn/code/185.html