Created
July 9, 2014 08:48
-
-
Save mikedamoiseau/111850d2c743c75ba6bd to your computer and use it in GitHub Desktop.
CakePHP - Display last executed SQL query
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$dbo = $this->Job->getDatasource(); | |
$logs = $dbo->getLog(); | |
$lastLog = end($logs['log']); | |
debug( $lastLog['query'] ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is for CakePHP 2.X only