[TYPO3-dev] exec_SELECT_mm_query

Rupert Germann rupi at gmx.li
Thu Feb 9 14:26:42 CET 2006


Mario Matzulla wrote:
> I was working with tt_news and tt_news_cat. Both are related through a
> M:M relation.
> 
> Now my problem:
> If I do an exec_SELECT_mm_query both tables get merged into one
> result-row. But both tables contain a title column. The tt_news title
> column gets overwritten by the tt_news_cal column.
> 
> Shouldn't the result include the table names like "tt_news.title" and
> "tt_news_cat.title" so this wouldn't happen?
> 
> Maybe I havn't seen a configuration option, then please point me to it.

the $select var in this function expects fieldnames to be prepended with the
tablename. Of course you could also use "AS", f.e.: ... tt_news_cat.title
AS cattitle, tt_news.title AS newstitle....

this has to be done manually in your php script.

greets
rupert




More information about the TYPO3-dev mailing list