- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
public synchronized void changePassword(String password, int id){
try {
Connection conn = Db.getInstance().createConnection();
Statement stmt = conn.createStatement();
String sql = "UPDATE "+tableName+"SET `password` ='"+password+"' WHERE `userId` ="+id+"";
stmt.executeUpdate(sql);
}
catch(Exception ex){
Logger.writeToFile("Exception occured " + ex.toString());
}
}