tp5下查询mysql重复数据
//查询重复数据 public function cf(){ $cf=Db::query("SELECT *,min(id) as ids, count( mobile ) AS count FROM tp_guest where `delete_time` IS NULL GROUP BY mobile HAVING count >1"); $this->assign('list',$cf); return $this->fetch('cf'); }