Hello,
Using the replace function in MySQL (the str_replace of MySQL) in a SELECT
clause will cause the parser to throw PHP notices & warnings.
Example: Query is :
SELECT test_ID,
test_name,
REPLACE( test_name , 'aa', 'bb') AS 'test_name_modified'
FROM test
ORDER BY test_name ASC;
Notice: Undefined index: alias in
PHP-SQL-Parser\src\processors\OrderByProcessor.php on line 69
Notice: Undefined index: INTO in
PHP-SQL-Parser\src\processors\InsertProcessor.php on line 50
Warning: Invalid argument supplied for foreach() in
PHP-SQL-Parser\src\processors\InsertProcessor.php on line 51
Notice: Uninitialized string offset: 0 in
PHP-SQL-Parser\src\processors\AbstractProcessor.php on line 66
Notice: Uninitialized string offset: 0 in
PHP-SQL-Parser\src\processors\AbstractProcessor.php on line 71
Notice: Uninitialized string offset: 0 in
PHP-SQL-Parser\src\processors\AbstractProcessor.php on line 76
I am using php-sql-parser version SVN: $Id: PHPSQLParser.php 757 2013-12-16
09:54:05Z phosco@gmx.de $
with PHP 5.4.6
Is there a way around this? It "works" but I like to have a clean output,
without warnings & notices.
Thank you!
Original issue reported on code.google.com by charline...@gmail.com on 22 Dec 2014 at 3:20
Original issue reported on code.google.com by
charline...@gmail.com
on 22 Dec 2014 at 3:20