[TYPO3] Joining tables with Typo-Script

Frederic Gaus mailinglists at necroshine.de
Sun Mar 5 10:59:28 CET 2006


Hi Guys,

I'm searching for a solution for the following problem:
I want to create a page on which the content-elements of it's subpage
are shown. I've tried it with the following Typo3-code, but it's not
working. I've no clue what could be wrong.

page.10.marks.CONTENT.10 = CONTENT
page.10.marks.CONTENT.10 {
   table = pages
   select.join = tt_content
   select.where = pages.uid=tt_content.pid
   select.andWhere = pages.pid = 1983

   # table = tt_content
   # select.where = pages.uid = tt_content.pid
   # select.selectFields = tt_content.*, pages.pid
   # select.pidInList = 1983
   # select.where = pages.pid = 1983
   # select.join = pages
   # select.join = pages ON pages.uid = tt_content.pid
   # select.where = pages.uid=tt_content.pid
   # select.andWhere = pages.pid=1983
}

PS: The following SQL-Code returns the right result:
SELECT tt_content.* FROM pages JOIN tt_content WHERE (tt_content.pid =
pages.uid) AND (pages.pid = 1983)

Thanks for your help

Freddy

-- 
Frederic Gaus                                 pgp-key: 93E6903C
fingerprint: 0C55 4517 CC1E 5F7F 9059  3535 AB54 D8E8 93E6 903C



More information about the TYPO3-english mailing list