Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用这条线来做一个数据库选择:
$res = $TYPO3_DB->exec_SELECTquery('*', $table, $this->cObj->enableFields($table), '' , '', '');
问题是 SQL 错误:
SELECT * FROM xyz WHERE AND xyz.deleted=0 AND.......
有人知道为什么会这样吗?我如何使用 enableFields 函数处理 where clouse 有什么问题吗?
TYPO3 维基
如果你还没有 WHERE 子句,你会得到一个错误的 SQL 语句(“SELECT * FROM tt_address WHERE AND ...”),所以你必须去掉前导 AND
采用'1'.$this->cObj->enableFields($table)
'1'.$this->cObj->enableFields($table)