我们正在创建一个新网站,到目前为止没有遇到任何问题。我们仍然可以访问我们的管理面板,但昨天这条消息显示在主页的位置:
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 ') AND ( a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2014-04-29 15:2' at line 1 SQL=
SELECT
a.*,
c.name as categoryname,
c.id as categoryid,
c.alias as categoryalias,
c.params as categoryparams
FROM
am4xy_k2_items as a
LEFT JOIN am4xy_k2_categories c ON c.id = a.catid
WHERE
a.published = 1
AND a.access IN(1,1)
AND a.trash = 0
AND c.published = 1
AND c.access IN(1,1)
AND c.trash = 0
AND a.catid IN()
AND ( a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2014-04-29 15:25:15' )
AND ( a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2014-04-29 15:25:15' )
ORDER BY a.created ASC
LIMIT 0, 16
有什么想法吗?
最佳答案
IN()
不能为空:
AND a.catid IN()
您需要添加缺失值或在没有缺失值时将其删除。
关于mysql - 错误 1064 您的 SQL 语法有误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23369045/