|
我在查询数据的过程中$this->db->select('count(client_city) ,client_city')->from('taskshare_record')->where(array('aid'=>$aid))->limit(10)->order_by('count(client_city)','desc')->get()->result_array();这样不写group_by(" xxx ")就可以执行,如果写成 $this->db->select('count(client_city) ,client_city')->from('taskshare_record')->where(array('aid'=>$aid))->group_by("client_city")->limit(10)->order_by('count(client_city)','desc')->get()->result_array();就会执行变得特别慢,然后报错:Fatal error: Maximum execution time of 300 seconds exceeded in F:\wamp\www\sql\system\database\drivers\mysqli\mysqli_driver.php on line 305;有没有大神帮忙看看解决下,谢谢!!! |
|