if(hidPass.equals(pass)){
String encodedPass = Base64.encode(newPass.getBytes(), Base64.BASE64DEFAULTLENGTH);
try{
String connectionURL = "jdbc:mysql://localhost:3306/books";// books is the database
Connection connection=null;
Class.forName("com.mysql.jdbc.Driver");
connection = DriverManager.getConnection(connectionURL, "root", "bonnysingh");
Statement st = connection.createStatement();
st.executeUpdate("UPDATE signup SET password="+encodedPass+"WHERE Username="+CurrentUser);
System.out.println("Update Complete");
}
catch(Exception e){
System.out.println(e);
response.sendRedirect("view.jsp");
}
}
else{
System.out.println("Update InComplete");
}
我收到此错误
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以在第 1 行的“WHERE Username=Damanpreet”附近使用正确的语法
谁能帮我吗?