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

NOW() function makes parsing to fail #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
SELECT NOW();

or 

SELECT test1
FROM table1
WHERE test_date < NOW();

I get a blank page showing this error :

Fatal error: Cannot use string offset as an array in 
H:\Project\Openflyers30\classes\PHPSQLParser.php on line 1145

For any SQL queries where I've "NOW()", the parser always fails.

Original issue reported on code.google.com by johnny.c...@gmail.com on 5 Jan 2011 at 9:40

GoogleCodeExporter commented 8 years ago
Thank you for your report.  It seems there is a problem with functions that do 
not accept any parameters.

I'll investigate and incorporate a fix.

For now, I've added a (failing) test to the test suite.

Original comment by greenlion@gmail.com on 4 Feb 2011 at 8:46

GoogleCodeExporter commented 8 years ago
This is now fixed in SVN.  

Original comment by greenlion@gmail.com on 21 Mar 2011 at 7:21