Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- // String userName = "root";
- // String password = "123456";
- // String u;
- // u = "vasya";
- // String ps = "qwerty";
- // String url = "jdbc:mysql://localhost/db_univer";
- // Class.forName ("com.mysql.jdbc.Driver").newInstance ();
- // conn = DriverManager.getConnection (url, userName, password);
- // System.out.println ("Database connection established");
- //
- // Statement s = conn.createStatement ();
- // s.executeQuery ("SELECT passwd FROM t_user WHERE nick = '" + u + "'");
- // ResultSet rs = s.getResultSet ();
- // int count = 0;
- // while (rs.next ())
- // {
- // String ps_true = rs.getString ("passwd");
- // System.out.println (
- // "True password = " + ps_true +
- // " Input password = " + ps);
- // ++count;
- // }
- // rs.close ();
- // s.close ();
Add Comment
Please, Sign In to add comment