MySQL error in file: /engine/modules/files/newfiles.php at line 14
Error Number: 1064
The Error returned was:
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 5
SQL查詢:MySQL錯誤#1064,我不認爲:怎麼辦?
SELECT `id`, `title`, `version`, `alt_name` FROM `dle_` WHERE `approve` = '0' AND `date` < '2014-08-28 12:57:32' ORDER BY `date` DESC LIMIT 0,
的代碼片段:
$db->query ("SELECT `id`,
`title`,
`version`,
`alt_name`
FROM `".PREFIX ."_".$modul_dbtitle ."` WHERE `approve` = '0' AND `date` < '{$thisdate}' ORDER BY `date` DESC LIMIT 0,".$filesConfig ['numbernewfiles'] ."");
請*不*不適用於您的問題使用標籤 – 2014-08-28 13:10:46
LIMIT 0是沒有意義的刪除它 – Mihai 2014-08-28 13:12:13
確保'numbernewfiles'列是一個'int',確實有一個值通過'$ filesConfig'傳遞。另外,如果你的列名確實是'numbernewfiles'而不是'Numbernewfiles' - 將錯誤報告添加到文件頂部 'error_reporting(E_ALL); ini_set('display_errors',1);' – 2014-08-28 13:31:56