dongsi5381 2014-08-28 13:08
浏览 138

MySQL错误#1064,我不认为:该怎么办?

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 query:

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,

code fragment:

 $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'] ."");
  • 写回答

2条回答 默认 最新

  • douzaoqu4447 2014-08-28 13:12
    关注

    $modul_dbtitle apparently does not have a value as your tablename is incomplete in your query.

    SELECT `id`, `title`, `version`, `alt_name` FROM `dle_` WHERE `approve` = '
                                                      ^^^^^^
                                                       HERE
    

    You need to figure out why. My guess is you are missing an e in the variable name:

    $modul_dbtitle
    

    should be

    $module_dbtitle
    

    Additionally, $filesConfig ['numbernewfiles'] also contains no value and will break your query.

    You should ensure error reporting is turned on as I suspect PHP would be warning you about these errors.

    评论

报告相同问题?

悬赏问题

  • ¥15 phython读取excel表格报错 ^7个 SyntaxError: invalid syntax 语句报错
  • ¥20 @microsoft/fetch-event-source 流式响应问题
  • ¥15 ogg dd trandata 报错
  • ¥15 高缺失率数据如何选择填充方式
  • ¥50 potsgresql15备份问题
  • ¥15 Mac系统vs code使用phpstudy如何配置debug来调试php
  • ¥15 目前主流的音乐软件,像网易云音乐,QQ音乐他们的前端和后台部分是用的什么技术实现的?求解!
  • ¥60 pb数据库修改与连接
  • ¥15 spss统计中二分类变量和有序变量的相关性分析可以用kendall相关分析吗?
  • ¥15 拟通过pc下指令到安卓系统,如果追求响应速度,尽可能无延迟,是不是用安卓模拟器会优于实体的安卓手机?如果是,可以快多少毫秒?