我在尝试编写脚本时出现此错误。
mySQL query error: SELECT * FROM ibf_store_shopstock WHERE is_hidden='0' AND category=1 ORDER BY item_name ASC LIMIT 0,
mySQL error: 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 '' at line 1
mySQL error code:
Date: Monday 23rd 2012f July 2012 05:37:44 PM`
这很奇怪,因为我在localhost(MySQL 5.5.14)上尝试过的脚本运行得很好,但是当我在实时服务器(MySQL 5.1.63)上尝试它时,会导致此错误。我认为MySQL版本之间没有太大区别?
无论如何这里是可疑脚本的一部分(它很长): http://pastebin.com/YaQwVPqT
答案 0 :(得分:1)
我认为你在LIMIT条款"LIMIT start_record", "offset"
试
SELECT *
FROM ibf_store_shopstock
WHERE is_hidden='0' AND
category=1
ORDER BY item_name ASC
LIMIT 0, 10;