Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Class.forName("com.mysql.jdbc.Driver");
- resp.setContentType("Content-Text");
- Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/railwaystation", "user", "password");
- PreparedStatement ps = con.prepareStatement("SELECT * FROM пользователь WHERE login = ? and password = ?");
- ps.setString(1, login);
- ps.setString(2, password);
- ResultSet rs = ps.executeQuery();
Add Comment
Please, Sign In to add comment