Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Typo3 在selectwhere语句中插入fe_用户uid_Typo3_Typoscript_Extbase - Fatal编程技术网

Typo3 在selectwhere语句中插入fe_用户uid

Typo3 在selectwhere语句中插入fe_用户uid,typo3,typoscript,extbase,Typo3,Typoscript,Extbase,我正在尝试将当前登录的fe_用户的UID插入打字脚本select语句。我需要基于一些条件的总记录计数,并仅获取属于当前用户的记录数(通过recipientuseruid) 到目前为止,我一直在尝试: lib.newMessagesCountLabel = CONTENT lib.newMessagesCountLabel { table = tx_mygigs_domain_model_message select { selectFields = count(*) AS c

我正在尝试将当前登录的fe_用户的UID插入打字脚本select语句。我需要基于一些条件的总记录计数,并仅获取属于当前用户的记录数(通过recipientuseruid)

到目前为止,我一直在尝试:

lib.newMessagesCountLabel = CONTENT
  lib.newMessagesCountLabel {
  table = tx_mygigs_domain_model_message
  select {
    selectFields = count(*) AS count
    pidInList = 20
    where = ( isread='0' AND hidden='0' AND deleted='0' )
    andWhere = recipientuseruid={TSFE:fe_user|user|id}
  }

  renderObj = COA
  renderObj {
    10 = TEXT
    10 {
      wrap = |
      data = field:count
    }
  }
}
但是你可以猜到,目前为止没有任何运气。我使用的是typo36.1

谢谢

试试看

andWhere.dataWrap = recipientuseruid={TSFE:fe_user|user|uid}
顺便说一句:因为typo34.6,“where”也是stdWrap,所以您可以简单地编写

where.dataWrap = isread=0 AND hidden=0 AND deleted=0 AND recipientuseruid={TSFE:fe_user|user|uid}

这也不起作用,顺便说一句:选择{selectFields=count(*)作为count pidInList=20,其中=isread=0和where.data=TSFE:fe|u user | user | id和where.wrap=recipientuseruid=|}嗨,Krystian,这不起作用,我尝试了两种解决方案。例如:
where.dataWrap=isread=0,hidden=0,deleted=0,recipientuseruid={TSFE:fe|u user | user | id}
where.dataWrap=isread=0,hidden=0,deleted=0,recipientuseruid=1,另一方面确实有效(1是fe|u用户的UID),我现在明白原因了。在TYPo3中没有id。我更正了答案。