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

UPDATE property no_quotes fails if something like this is queried: db.`tablename` #122

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. $parser = new PHPSQLParser("UPDATE db.`tablename` SET a=1");
2. echo $parser->parsed['UPDATE'][0]['no_quotes']

What is the expected output? What do you see instead?
db.tablename

db.`tablename`

Original issue reported on code.google.com by TuningGu...@googlemail.com on 15 Feb 2014 at 6:46

GoogleCodeExporter commented 9 years ago
Yes, there is a problem with the no_quotes property. There is a TODO within the 
backtick.php of the parser's test cases.

Original comment by pho...@gmx.de on 18 Feb 2014 at 1:23

GoogleCodeExporter commented 9 years ago
Because the quoted parts could contain dots or whitespace, I will return an 
array of all parts. So we can better see, which one will be the tablename and 
which one will be the column name (for example). It needs a new function 
revokeQuotation() within the AbstractProcessor.

Original comment by pho...@gmx.de on 22 Feb 2014 at 8:16

GoogleCodeExporter commented 9 years ago
I have fixed that issue in r1093.

Original comment by pho...@gmx.de on 25 Feb 2014 at 9:09