The following code return the last query that was running in codeigniter.
Sometimes we want to display which query was currently running. For this purpose just echo
the query then it will display the last query that was run.
<!-- Codeigniter last Query --> <?php $last_query = $this->db->last_query(); ?> <!-- It will produce: SELECT * FROM table WHERE.... -->
EmoticonEmoticon