I want to get the last query CakePHP ran. I can\'t turn debug on in core.php and I can\'t run the code locally. I need a way to get the last sql query and log it to the erro
This will help you.
echo ''; $log = $this->YOUR_MODEL->getDataSource(); print_r($log); exit;
'; $log = $this->YOUR_MODEL->getDataSource(); print_r($log); exit;