我用query函数来处理SQL$query=$this->db->query("select count(list_state) from qc_repairs_List where date_format(list_up_date,'%Y')=$date");
return $query->result();我只是想要 查询到多少行,在view中,显示是一个object,其他sql语句都没啥问题,可是select count查到的结果,怎么也拿不到。怎么解决!
$query=$this->db->query("select count(list_state) as total from qc_repairs_List where date_format(list_up_date,'%Y')=$date"); return$query->row()->total;