Created
September 22, 2017 10:20
-
-
Save mavitm/8e3e1c9b70861ba2d1766e928c39ad80 to your computer and use it in GitHub Desktop.
toSql binding
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 | |
//throw new \October\Rain\Exception\ApplicationException(@intval($data['page'])); | |
$sql = $query->toSql(); | |
foreach($query->getBindings() as $binding) | |
{ | |
$value = is_numeric($binding) ? $binding : "'".$binding."'"; | |
$sql = preg_replace('/\?/', $value, $sql, 1); | |
} | |
throw new \October\Rain\Exception\ApplicationException($sql); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment