报错:
java.sql.SQLException: 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 ''username',password,email) values('ww','admin','[email protected]')' at line 1 Query: insert into t_user('username',password,email) values(?,?,?) Parameters: [ww, admin, [email protected]]
我的错误是在UserDaoImpl包下的实现类saveUser
别在属性名前加引号!!!!!!!!!!!!!!
错误写法:
String sql = "insert into t_user('username','password','email') values(?,?,?)";
正确写法:
String sql = "insert into t_user(username,password,email) values(?,?,?)";