显示SQL语法
$this->db->last_query();
回传最后使用的查询语法(回传查询字串,并非是查询结果)。
$this->db->last_query();回传最后使用的查询语法(回传查询字串,并非是查询结果)。// 产生: SELECT * FROM sometable....
显示查询结果数量
$this->db->count_all_results();
让你可以判断特定的 Active Record 查询的结果列数。
echo $this->db->count_all_results('my_table');// 产生整数结果, 像是 25$this->db->like('title', 'match');$this->db->from('my_table');echo $this->db->count_all_results();// 产生整数结果, 像是 17