Project

General

Profile

Actions

Bug #18264

closed

t3lib_sqlparse::parseFromTables does not work with inner joins and joins with ()

Added by Ingo Schmitt almost 17 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2008-02-21
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.2
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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)

Actions

Also available in: Atom PDF