2012-12-06 47 views
0

林選擇:

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

的問題是一個SQL錯誤:

SELECT * FROM XYZ WHERE AND xyz.deleted = 0 AND .......

有人知道爲什麼會發生這種情況?如何處理使用enableFields函數的地方有什麼問題?

回答

2

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)

相關問題