summaryrefslogtreecommitdiff
path: root/idiorm.php
diff options
context:
space:
mode:
Diffstat (limited to 'idiorm.php')
-rw-r--r--idiorm.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/idiorm.php b/idiorm.php
index 7e7a70b..58a67ae 100644
--- a/idiorm.php
+++ b/idiorm.php
@@ -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;
}