sql语句异常向数据库插入数据报错

在php编程向数据库插入数据时报如下错误:

[Err] 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 ------
这种异常通常是sql语句出错,根据报错提示找到相应的Line。

我的报错原因是出现了乱码,数据库字段名使用了中文,在换成英文后报错解决。

posted @ 2021-06-12 00:06  天岁  阅读(99)  评论(0编辑  收藏  举报