How to print last executed query in cakephp?

In the Cakephp, the printing of last executed query is not so much good as CodeIgniter. Here is the code, by using this we can print the last executed query in cakephp $dbo = $this->ModelName->getDatasource(); $logs = $dbo->getLog(); $log = end($logs['log']); echo "<pre>"; print_r($log); echo "</pre>"; exit();   Now, you can see the last executed … Continue reading How to print last executed query in cakephp?