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.

    评论

报告相同问题?

悬赏问题

  • ¥15 2024-五一综合模拟赛
  • ¥15 如何将下列的“无限压缩存储器”设计出来
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口