Permalink
Browse files

do not treat mysql assignment operator as a paramter

  • Loading branch information...
1 parent 1105261 commit 0bc9bbb0674adc52191e1ce47697093f6e41537e @roverwolf committed Dec 18, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Doctrine/DBAL/SQLParserUtils.php
View
4 lib/Doctrine/DBAL/SQLParserUtils.php
@@ -54,7 +54,7 @@ static public function getPlaceholderPositions($statement, $isPositional = true)
$stmtLen = strlen($statement);
$paramMap = array();
for ($i = 0; $i < $stmtLen; $i++) {
- if ($statement[$i] == $match && !$inLiteral) {
+ if ($statement[$i] == $match && !$inLiteral && (!$isPositional && $statement[$i+1] != '=')) {
// real positional parameter detected
if ($isPositional) {
$paramMap[$count] = $i;
@@ -180,4 +180,4 @@ static public function expandListParameters($query, $params, $types)
return array($query, $paramsOrd, $typesOrd);
}
-}
+}

0 comments on commit 0bc9bbb

Please sign in to comment.