Guest User

Untitled

a guest
Jun 27th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
GDB 0.40 KB | None | 0 0
  1.     public int getUserType(String playerName)
  2.     {
  3.         String query = "SELECT usertype FROM users WHERE username = '" + playerName + "';";
  4.         int usertype = 0;
  5.        
  6.         try
  7.         {
  8.             String[][] returned = enigma.returnedDataBase(query, 1);
  9.             usertype = Integer.parseInt(returned[0][0]);
  10.         }
  11.         catch (Exception e)
  12.         {
  13.             System.out.println("DB Error: " + e.getLocalizedMessage());
  14.         }
  15.         return usertype;
  16.     }
Add Comment
Please, Sign In to add comment