diff options
author | Jamie Matthews <[email protected]> | 2010-10-22 02:04:42 +0100 |
---|---|---|
committer | Jamie Matthews <[email protected]> | 2010-10-22 02:04:42 +0100 |
commit | f93ad0a9d59e076f654da32c628743ba67284e03 (patch) | |
tree | 7b6b6639b0f2ca3b0983a2fb872168e349b66a32 /idiorm.php | |
parent | 37cb37a1c310a60dc8ba4329e03d6ae7d8bf6fb0 (diff) |
Fix query binding in _log_query method
Diffstat (limited to 'idiorm.php')
-rw-r--r-- | idiorm.php | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -218,11 +218,11 @@ // Escape the parameters $parameters = array_map(array(self::$_db, 'quote'), $parameters); - // Build an array containing the same number of ? placeholders as there are params - $placeholders = array_fill(0, count($parameters), '?'); + // Replace placeholders in the query for vsprintf + $query = str_replace("?", "%s", $query); // Replace the question marks in the query with the parameters - $bound_query = str_replace($placeholders, $parameters, $query); + $bound_query = vsprintf($query, $parameters); } else { $bound_query = $query; } |