Typoscript SQL select(DataProcessing)

时间:2016-10-24 12:11:08

标签: typo3

我想从另一个表中获取当前元素的记录。

这是我的Typoscript。我需要这样的东西:

  

其中= uid = 3(这应该是当前的tx_my_doors记录>   字段:功能)

看看" 20"在TS。

tt_content.irre_doors =< lib.default
tt_content.irre_doors {
    templateName = IRRE_Doors
    dataProcessing {
        5 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
        5 {
            table = tx_my_doors
            pidInList.field = pid
            where {
                data = field:uid
                intval = 1
                wrap = tt_content=|
            }
            orderBy = sorting
            as = doors
            dataProcessing {
                10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
                10 {
                    references.fieldName = image
                    as = images
                }
                20 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
                20 {
                    table = tx_my_product_features
                    pidInList = 26
                    where = uid = 3 (this should be current tx_my_doors record > field:features)
                    orderBy = sorting
                    as = test
                }
            }
        }
    }
}

2 个答案:

答案 0 :(得分:1)

你尝试过这个吗? (另)

            20 {
                table = tx_my_product_features
                pidInList = 26
                where {
                    data = field:features
                    wrap = uid=|
                }
                orderBy = sorting
                as = test
            }

答案 1 :(得分:1)

请注意,您可以使用TS manual for select

中的标记

因为你可以使用stdWrap,你可以构建复杂的查询