rickywu-posh / php-sql-parser

Automatically exported from code.google.com/p/php-sql-parser
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

ORDER BY has problems with expressions #130

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Define query "select * from t1 order by c2-c1"
2. subsequent parse and create results in :
Fatal error: Uncaught exception 'UnableToCreateSQLException' with message 
'unknown [expr_type] = expression in "ORDER" [0] ' in 
D:\ontwikkeling\www\SqlParser\src\builders\OrderByBuilder.php on line 82 

What is the expected output? What do you see instead?
Expected : "select * from t1 order by c2-c1"

What version of the product are you using? On what operating system?
checkout after r1099

Please provide any additional information below.
same result with "select * from t1 order by 999-c1"
functions are accepted :
"select * from t1 order by abs(c1)" runs fine

Original issue reported on code.google.com by Henk.Blo...@gmail.com on 25 Feb 2014 at 1:49

GoogleCodeExporter commented 8 years ago
Fixed in r1107

Original comment by pho...@gmx.de on 25 Feb 2014 at 2:35

GoogleCodeExporter commented 8 years ago

Original comment by pho...@gmx.de on 25 Feb 2014 at 2:35