一、报错信息

错误代码: 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 ‘desc =‘xx‘ LIMIT 0, 1000‘ at line 1
中文解释(百度翻译......):
1064您的SQL语法中有一个错误;请查看与您的MySQL服务器版本相对应的手册,以了解在第1行使用接近 ‘desc =‘xx‘ LIMIT 0,1000‘的语法。
二、报错原因
这是因为数据库表中的字段名引用了关键字,例如上面报错字段“desc”。
三、解决办法
写sql语句时,引用到与mysql关键字重名的字段时,加上“:
select * from package where `desc` =‘xx‘;
如下,搜索成功: