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 構文にエラーがあります。1 行目の 'WHERE Username=Damanpreet' 付近で使用する正しい構文については、MySQL サーバーのバージョンに対応するマニュアルを確認してください。
誰でも私を助けることができますか?