作业帮 > 综合 > 作业

You have an error in your SQL syntax; check the manual that

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/19 23:46:43
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server.
运行一个程序时来出现这样的问题:
连接数据库成功
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 'age=ee,regdate=323-00-00' at line 1
我的代码是:
错误是在那个update语句,就是不知道怎么改来该去就是不行.
你打印出来看看,如果有字符串的字段的话,最好加''试试,$sql="update userinfo set usename='$usename',gender='$gender',age='$age',regdate='$regdate' where id=$id";
这类的,你试试看吧