SHARE
TWEET

Untitled

Reykez Dec 31st, 2018 95 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /** try {
  2.             con = DriverManager.getConnection("jdbc:mysql://reykez.pl:3306/<nickname>" , "<nickname>" , "<pass>");
  3.             st = con.createStatement();
  4.             rs = st.executeQuery("select * from USERS WHERE NICK = '" + nickname + "'");
  5.             if(rs.last()) {
  6.                 rowCount = rs.getRow();
  7.             }
  8.             System.out.println(rowCount);
  9.             if(rowCount >= 1) {
  10.                 return false; // nick zajęty
  11.             } else {
  12.                 return true; //nick wolny
  13.             }
  14.         } catch(Exception e) { e.printStackTrace(); }
  15.         return false; // nick jest zajęty **/
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top