Are you want to display last executed query in Codeigniter ?
You can use last_query() function of db class in Codeigniter.
You can use in controller and get output of last executed query:
Example :
public function get_cities(){
$query = $this->db->get("cities");
$str = $this->db->last_query();
echo "<pre>";
print_r($str);
exit;
}
Output:
SELECT * FROM `items`
No comments:
Post a Comment