diff --git a/src/Pecee/Pixie/QueryBuilder/QueryObject.php b/src/Pecee/Pixie/QueryBuilder/QueryObject.php index 439061b..cec2d08 100644 --- a/src/Pecee/Pixie/QueryBuilder/QueryObject.php +++ b/src/Pecee/Pixie/QueryBuilder/QueryObject.php @@ -83,9 +83,11 @@ protected function interpolateQuery($query, $params): string $keys = []; $values = $params; + $query = str_replace('?', ':?', $query); + // build a regular expression for each parameter foreach ($params as $key => $value) { - $keys[] = '/' . (\is_string($key) ? ':' . $key : '[?]') . '/'; + $keys[] = '/' . (\is_string($key) ? ':' . $key : '\:\?') . '/'; if($value instanceof Raw) { continue;