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

Does not understand OR as || #102

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
SELECT IF(f = 0 || f = 1, 1, 0) FROM tbl

PHP Fatal error: Uncaught exception 'UnableToCalculatePositionException' with 
message 'cannot calculate position of | within || f = 1, 1, 0) FROM tbl' in 
/some_dir/position-calculator.php:188

Original issue reported on code.google.com by lexx...@gmail.com on 29 Nov 2013 at 8:49

GoogleCodeExporter commented 8 years ago
This is a problem of the lexer. It splits operators like || or << into two 
single operators. I have fixed it in r602. There are two test cases, which 
successfully run.

Original comment by pho...@gmx.de on 30 Nov 2013 at 4:01