Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static boolean saveVotingPassword(String playerName, String password) {
- try {
- String query = "SELECT * FROM voting WHERE username LIKE '" + playerName+ "'";
- results = stmt.executeQuery(query);
- if (results.next()) {
- if (playerName.equalsIgnoreCase(results.getString("username"))) {
- if (results.getString("votepassword").length() < 5) {
- query("update voting set votepassword = '" + password + "' WHERE username = '" + playerName+ "'");
- }
- }
- }
- } catch (Exception e) {
- e.printStackTrace();
- return false;
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement