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)
Updated by Michael Miousse over 15 years ago
the function can't parse from with multiple join and it don't have to be a inner join could be a left or rigth join to. Any kind of join
Updated by Alexander Opitz over 11 years ago
- Status changed from New to Needs Feedback
- Target version deleted (
0)
The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?
Updated by Alexander Opitz about 11 years ago
- Status changed from Needs Feedback to Closed
- Is Regression set to No
No feedback for over 90 days.