[TYPO3] select inside select
JoH asenau
info at cybercraft.de
Wed Dec 12 02:44:46 CET 2007
> Can I do something like this
>
> tmp.Simple= CONTENT
> tmp.Simple {
> table = tt_news
> select {
> ...
> }
> renderObj=COA
> renderObj {
> ...
> 40 = COA
> 40 {
> 10 = CONTENT
> 10.table = tt_news
> 10.select {
> andWhere = uid = ?? uids of related records
> }
> }
> }
> }
Of course you can. But it might be a bit difficult since the relations are
stored as real MM table records _and_ they can be pages or tt_news records.
So you have to join the tables tt_news and tt_news_related_mm and you have
to use
tt_news_related_mm.tablenames='tt_news'
in addition.
Not sure about the syntax since I never used something like that but it
could be working like this:
10 = CONTENT
10.table = tt_news
10.select {
join = tt_news_related_mm
andWhere.dataWrap (
tt_news_related_mm.uid_local={field:uid} AND
tt_news_related_mm.uid_foreign=tt_news.uid AND
tt_news_related_mm.tablenames='tt_news'
)
}
{field:uid} contains the uid of the tt_news record from your former
CONTENT.select statement.
HTH
Joey
--
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
openBC/Xing: http://www.cybercraft.de
T3 cookbook: http://www.typo3experts.com
Jobs: http://www.professionals-only.com
More information about the TYPO3-english
mailing list