1
0
mirror of synced 2024-12-13 22:56:04 +03:00

[2.0] Reverted r7392 which generates broken SQL query.

This commit is contained in:
guilhermeblanco 2010-03-16 16:32:30 +00:00
parent bb94f6ea7c
commit 29e5141280
2 changed files with 3 additions and 5 deletions

View File

@ -2129,7 +2129,7 @@ class Parser
/**
* ArithmeticPrimary ::= SingleValuedPathExpression | Literal | "(" SimpleArithmeticExpression ")"
* | FunctionsReturningNumerics | AggregateExpression | FunctionsReturningStrings
* | FunctionsReturningDatetime | ResultVariable
* | FunctionsReturningDatetime | IdentificationVariable
*/
public function ArithmeticPrimary()
{
@ -2154,7 +2154,7 @@ class Parser
return $this->SingleValuedPathExpression();
}
return $this->ResultVariable();
return $this->IdentificationVariable();
case Lexer::T_INPUT_PARAMETER:
return $this->InputParameter();

View File

@ -1640,9 +1640,7 @@ class SqlWalker implements TreeWalker
} else if ($primary instanceof AST\Node) {
$sql .= $primary->dispatch($this);
} else if (is_string($primary)) {
$columnName = $this->_queryComponents[$primary]['token']['value'];
$sql .= $this->_scalarResultAliasMap[$columnName];
// We need to deal with IdentificationVariable here
}
return $sql;