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

fake aliases for table names #18

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

I try to use your parser within a small project. I need the table names and 
their aliases within a SELECT statement to check, which columns are used within 
the ORDER BY clause. The first test produces a problem:

SELECT * FROM answers ORDER BY qid

The parser generates an alias ANSWERS, but the table doesn't have an alias. So 
it is not possible to find column names within the ORDER clause with the alias 
(the alias can or cannot be a valid alias).

Please remove the alias from the resulting array, if the table doesn't have an 
alias within the SQL statement.

Thanks a lot
Andre

Original issue reported on code.google.com by pho...@gmx.de on 20 Jan 2012 at 8:12

GoogleCodeExporter commented 8 years ago
Solved in current version on http://www.phosco.info/php-sql-parser_current.zip

Original comment by pho...@gmx.de on 31 Jan 2012 at 10:16

GoogleCodeExporter commented 8 years ago
Accepted fixed codebase.

Original comment by greenlion@gmail.com on 12 Mar 2012 at 9:52