sanjosh / 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

Error with aggregate function on expression #103

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.
$_query = "SELECT SUM(a*b) FROM tbl GROUP BY c";
$_parser = new PHPSQLParser();
$_parser->parse($_query);
$_creator = new PHPSQLCreator($_parser->parsed);
$_query = $_creator->created;  

What is the expected output? What do you see instead?
Should have returned the original query. Instead, return error:
Fatal error: Uncaught exception 'UnableToCreateSQLException' with message 
'unknown expr_type in function subtree[1] operator...

What version of the product are you using? On what operating system?
php-sql-parser-20131024. Windows 7 SP1 32 bit. 

Please provide any additional information below.
XAMPP 1.8.3
PHP 5.5.3

Original issue reported on code.google.com by NguyenLu...@gmail.com on 6 Dec 2013 at 3:56

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Try to use the current version (see download section), the issue has been 
solved there.

Original comment by pho...@gmx.de on 6 Dec 2013 at 11:58