The last executed query can be retrieved in Codeigniter using the function
$lastquery = $this->db->last_query();
echo $lastquery;
This will print the query in the format
/// SELECT * FROM sometable....
Vipin is a Programmer who loves blogging and used to do research on new things. He loves to share those information through this blog. You can contact him via email vipin@techrounder.com