Created
March 3, 2017 10:56
-
-
Save twysto/3ed0f89007e18150f5bf7bd6b0d9564c to your computer and use it in GitHub Desktop.
This file contains 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
<?php | |
// Paste it before $query->execute() | |
die( | |
vsprintf( | |
strtr( | |
$query->getSqlQuery(), | |
array( | |
'?' => '%s', | |
'%' => '%%' | |
) | |
), | |
$query->getFlattenedParams() | |
) | |
); | |
// Shorter | |
die(vsprintf(strtr($query->getSqlQuery(),array('?'=>'%s','%'=>'%%')),$query->getFlattenedParams())); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment