TYPO3:在字段

问题描述

我有2张桌子。
tx_gfcontactpersons_gf_contactpersons:
字段:uid,pid,...,tx_gfcontactpersons_countries
字段tx_gfcontactpersons_countries是static_countries uid的列表,例如1,2,3

static_countries:
字段:uid,cn_iso_2,...

现在,我想例如找到正确的联系人CO =哥伦比亚 我使用getenv:HTTP_CF_IPCOUNTRY从cloudflare获取了isocode。 它包括我检测到的国家/地区,例如德 为了进行测试,我还包括一个URL-Param国家。

通常我会像下面这样使用DatabaseQueryProcessor:

45 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
45 {
    table = tx_gfcontactpersons_gf_contactpersons
    pidInList = 73
    where.cObject = COA
    where.cObject{
        wrap = static_countries.cn_iso_2="|"
        10 = TEXT
        10{
            if.isTrue.data = GP:country
            data = GP:country
            trim = 1
            strPad = 2
            #encodeForJavaScriptValue = 1
        }
        20 = TEXT
        20{
            if.isFalse.data = GP:country
            data = getenv:HTTP_CF_IPCOUNTRY
        }
    }
    leftjoin = static_countries ON tx_gfcontactpersons_gf_contactpersons.tx_gfcontactpersons_countries = static_countries.uid
    as = gf_contactpersons_by_country
}

但是问题是联接。 我认为我不需要直接比较tx_gfcontactpersons_gf_contactpersons.tx_gfcontactpersons_countries = static_countries.uid。
它应该更像带有IN()或IN_List的东西。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...