使用sql更新语句又出现错误

来源:百度知道 编辑:UC知道 时间:2024/09/28 08:04:46
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: 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 '?,duserpwd=?,name=?,sex=?,department=?,birthday=?,tel=?,email=?,other=? where us' at line 1

sql语句为:update cb_user set userpwd=?,duserpwd=?,name=?,sex=?,department=?,birthday=?,tel=?,email=?,other=? where username = ?

你把值全部用 ? 来表示了,所以看不出错误来,如果是这们的格式是没有错误的,我估计你的错误应该是出在了类型上,比如 userpwd='password', 如果成了 userpwd=password 就出错了

最好把值改一下贴出原句来