Bug #18264
closedt3lib_sqlparse::parseFromTables does not work with inner joins and joins with ()
0%
Description
The method t3lib_sqlparse::parseFromTables is not able to parse inner joins into parts. It is also not able to pars joins with ( ) into parts.
try to get the parts from this SQL:
SELECT tt_news_cat.uid, tt_news_cat.title, COUNT AS cat_count
FROM tt_news_cat
INNER JOIN tt_news_cat_mm ON (tt_news_cat.uid = tt_news_cat_mm.uid_foreign)
INNER JOIN tt_news ON (tt_news.uid = tt_news_cat_mm.uid_local)
WHERE
tt_news.datetime < 1203549257 AND tt_news_cat.deleted=0 AND tt_news_cat.hidden=0 AND (tt_news_cat.starttime<=1203549240) AND (tt_news_cat.endtime=0 OR tt_news_cat.endtime>1203549240) AND (tt_news_cat.fe_group='' OR tt_news_cat.fe_group IS NULL OR tt_news_cat.fe_group='0' OR (tt_news_cat.fe_group LIKE '%,0,%' OR tt_news_cat.fe_group LIKE '0,%' OR tt_news_cat.fe_group LIKE '%,0' OR tt_news_cat.fe_group='0') OR (tt_news_cat.fe_group LIKE '%,-1,%' OR tt_news_cat.fe_group LIKE '-1,%' OR tt_news_cat.fe_group LIKE '%,-1' OR tt_news_cat.fe_group='-1')) AND tt_news.deleted=0 AND tt_news.t3ver_state<=0 AND tt_news.hidden=0 AND (tt_news.starttime<=1203549240) AND (tt_news.endtime=0 OR tt_news.endtime>1203549240) AND (tt_news.fe_group='' OR tt_news.fe_group IS NULL OR tt_news.fe_group='0' OR (tt_news.fe_group LIKE '%,0,%' OR tt_news.fe_group LIKE '0,%' OR tt_news.fe_group LIKE '%,0' OR tt_news.fe_group='0') OR (tt_news.fe_group LIKE '%,-1,%' OR tt_news.fe_group LIKE '-1,%' OR tt_news.fe_group LIKE '%,-1' OR tt_news.fe_group='-1'))
GROUP BY tt_news_cat_mm.uid_foreign
(issue imported from #M7606)