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

script dies with "cannot calculate position of" a table in the FROM clause #45

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. execute following code :

$sql = 'SELECT a from b left join c on c.a = b.a and (c.b. = b.b) where a.a > 
1';         
$parser = new PHPSQLParser($sql, true);

2. script dies with the following message :

cannot calculate position of c on c.a = b.a and (c.b. = b.b) within ) where a.a 
> 1

What is the expected output? What do you see instead?

Expected the query to be parsed correctly. Works if I change the query to :

$sql = 'SELECT a from b left join c on c.a = b.a and c.b. = b.b where a.a > 
1';         

or :

$sql = 'SELECT a from b left join c on (c.a = b.a and c.b. = b.b) where a.a > 
1';         

What version of the product are you using? On what operating system?

rev 235 on windows 7

Please provide any additional information below.

sorry if this is the same bug as issue 44

Original issue reported on code.google.com by nderm...@adequasys.com on 22 Apr 2012 at 6:22

GoogleCodeExporter commented 8 years ago
There is still a problem with the positions on sub_trees.

Original comment by pho...@gmx.de on 26 Apr 2012 at 1:52

GoogleCodeExporter commented 8 years ago
Try REV 257.

Original comment by pho...@gmx.de on 2 May 2012 at 12:36