sachin In the first line of a function in a controller or model, you can put to see the executed query along with dump of status of execution of the php script. $this->output->enable_profiler(TRUE); Or you can run $this->db->last_query();