具体内容:

错误代码: 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 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

原因:

这里主要因为数据库表中引用了mysql关键字(DESC)为字段名

处理方法:

数据库表中引用关键字为字段名时,需用`order`格式处理,(如:select * from table_a where `DESC`='xxxxx')

需注意,此处的符号不为常见的单引号(‘’),实际为英文状态下、电脑键盘数字一行最左侧按键(``)

Logo

更多推荐