将 RealURL 与 JOIN 语句一起使用 (TYPO3)
我在一个网站上使用 RealURL,我想在“lookUpTable”语句中连接两个表。生成的 URL 应该是表 a 和表 b 中的字段的组合。
所以基本上我想在 table
和 addWhereClause
中进行 JOIN,而不是使用多个 alias_fields
。
标准语法是:
'lookUpTable' => array(
'table' => 'user_3dsplmxml_bfsbrand',
'id_field' => 'xml_id',
'alias_field' => 'xml_title',
'maxLength' => 10,
'addWhereClause' => ' AND NOT deleted'
)
手册没有给出这是否可能的提示,但它会有很大的用处。有人知道这是否可以做到吗?
I'm using RealURL on a site where I would like to join two tables in the "lookUpTable" statement. The resulting URL should be a combination of fields in table a and table b.
So basically I would like to do a JOIN in table
and addWhereClause
and than use multiple alias_fields
.
The standard syntax is:
'lookUpTable' => array(
'table' => 'user_3dsplmxml_bfsbrand',
'id_field' => 'xml_id',
'alias_field' => 'xml_title',
'maxLength' => 10,
'addWhereClause' => ' AND NOT deleted'
)
The manual gives no hint if this is possible, but it would be of great use. Anyone knows if this can be done?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以使用 userFunc 代替 LookUpTable。
查看 realurl 手册
You can use a userFunc instead of the lookUpTable.
See realurl manual
这对我有用(TYPO3 6.1.7):
This worked for me (TYPO3 6.1.7):
我需要使用子查询。上面提到的 'table' => 方式'tableA a, tableB b' 没有返回任何值。
I needed to use a subquery. The mentioned way with 'table' => 'tableA a, tableB b' did not return any value.