duanmao9918 2016-05-11 03:04
浏览 245

PHP / MySQL升级的MySQL错误 - #1064 - 您的SQL语法出错

I've recently got this MySQL error:

Error SQL query:    
SELECT t.entry_id FROM db_channel_titles AS t LEFT JOIN db_channels ON t.channel_id = db_channels.channel_id LEFT JOIN db_members AS m ON m.member_id = t.author_id WHERE t.entry_id !='' AND t.site_id IN ('1')  AND t.entry_date < 1462934343 AND (t.expiration_date = 0 OR t.expiration_date > 1462934343) AND t.status = 'open' ORDER BY FIELD(t.entry_id, )  LIMIT 0, 100
MySQL said:   #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')  LIMIT 0, 100' at line 1

which I assume is from a PHP or MySQL upgrade.

Two questions:

  1. What is the error in the SQL?
  2. The PHP framework we're using is an old version of ExpressionEngine (version 2.0) so I'm not sure we can simply hack the SQL. Given that, I'm wondering what the quickest way of fixing the problem is. Any suggestions?
  • 写回答

2条回答 默认 最新

  • douweihui0178 2016-05-11 03:05
    关注

    Nothing to do with a PHP or MySQL upgrade. You have curly quotes:

    t.site_id IN (‘1’)
    

    in several places.

    评论

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!