gpt4 book ai didi

php - Typo3 $this->cObj->enableFields() SQL 错误 WHERE AND

转载 作者:行者123 更新时间:2023-11-29 08:41:13 24 4
gpt4 key购买 nike

我使用这一行进行数据库选择:

$res = $TYPO3_DB->exec_SELECTquery('*', $table, $this->cObj->enableFields($table), '' , '', '');

问题是 SQL 错误:

从 xyz WHERE AND 中选择 * xyz.deleted=0 AND.......

有人知道为什么会发生这种情况吗?我使用enableFields函数处理where Clouse的方式有问题吗?

最佳答案

TYPO3 wiki

If you don't already have a WHERE clause, you will get a wrong SQL statement ("SELECT * FROM tt_address WHERE AND ..."), so you have to strip the leading AND

使用'1'.$this->cObj->enableFields($table)

关于php - Typo3 $this->cObj->enableFields() SQL 错误 WHERE AND,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13740433/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com