You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Create a SQL query containing an aliased function without parameters (for
example "SELECT NOW() AS today"
2. Parse it
3. Create SQL from parsed query
What is the expected output? What do you see instead?
I expect "SELECT NOW() AS today"
I see "SELECT NOW()"
The alias is forgotten. If my function has parameters (DATEDIFF for example),
the alias is keeped.
What version of the product are you using? On what operating system?
SVN: $Id: PHPSQLParser.php 757 2013-12-16 09:54:05Z on linux
Please provide any additional information below.
In builders/FunctionBuilder.php, you wrote :
if ($parsed['sub_tree'] === false) {
return $parsed['base_expr'] . "()";
}
You should have :
if ($parsed['sub_tree'] === false) {
return $parsed['base_expr'] . "()". $this->buildAlias($parsed) . $this->buildDirection($parsed);;
}
Thanks !
Original issue reported on code.google.com by ludo.zeg...@gmail.com on 12 Dec 2014 at 8:09
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
ludo.zeg...@gmail.com
on 12 Dec 2014 at 8:09The text was updated successfully, but these errors were encountered: