$this->db->last_query();

return last query codeigneter