How to print Last Executed Query in Cakephp?

QuestionsCategory: CakephpHow to print Last Executed Query in Cakephp?
devchandan asked 3 months ago
$dbo = $this-> YourModelName -> getDatasource();
$logs = $dbo-> getLog();
$log   = end($logs['log']);

echo "<pre>"; print_r($log); echo "</pre>";
exit();