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

Additional brackets around join reference #104

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The creator (r790) adds some brackets around the join references (see issue 57):

$sql = "SELECT a.*, SUM(b.home) AS home,b.language,l.image,l.sef,l.title_native
FROM iuz6l_menu_types AS a
LEFT JOIN iuz6l_menu AS b ON b.menutype = a.menutype AND b.home != 0
LEFT JOIN iuz6l_languages AS l ON l.lang_code = language
WHERE (b.client_id = 0 OR b.client_id IS NULL)
GROUP BY a.id, a.menutype, a.description, a.title, 
b.menutype,b.language,l.image,l.sef,l.title_native";

will be created to:

SELECT a.*, SUM(b.home) as home, b.language, l.image, l.sef, l.title_native 
FROM iuz6l_menu_types as a LEFT JOIN iuz6l_menu as b ON (b.menutype = 
a.menutype AND b.home != 0) LEFT JOIN iuz6l_languages as l ON (l.lang_code = 
language) WHERE (b.client_id = 0 OR b.client_id IS NULL) GROUP BY a.id, 
a.menutype, a.description, a.title, b.menutype, b.language, l.image, l.sef, 
l.title_native

where after the ON keywords are brackets.

Original issue reported on code.google.com by pho...@gmx.de on 17 Dec 2013 at 4:51

GoogleCodeExporter commented 8 years ago
The builder for the ref-clause has been changed in r1225.

Original comment by pho...@gmx.de on 9 Mar 2014 at 10:46