[TYPO3-dev] Discussion to Bugfix #7545: Explain select not working with multiple tables
Martin Kutschker
martin.kutschker-n0spam at no5pam-blackbox.net
Wed Feb 20 22:02:53 CET 2008
Ingo Schmitt schrieb:
> Hi list,
>
> this is a follow up discussion to my post on the Core List:
>
> [TYPO3-core] RFC: Bugfix #7545: Explain select not working with multiple
> tables
>
> Investigating into the issue, i figured out, that a from clause could
> not only be two tables joined directly, but also with inner and outer
> joins. This breaks my patch, posted on the Core List.
>
> It seams that in this case: "SHOW INDEX FROM tt_news LEFT OUTER JOIN
> tt_news_cat_mm ON tt_news.uid = tt_news_cat_mm.uid_local" is the
> complete from clause on this sql statement. In this case we must detect
> every table in the from statement and extract it form the clause.
> I don't see a way to archive this by an easy way, since we have to write
> a parser on the from clause to extract the Tables.
Have a look at t3lib_sqlparser.
Masi
More information about the TYPO3-dev
mailing list