Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void signUp() {
- System.out.println("nSign Up For a Classn");
- try {
- System.out.println("Enter Student ID: ");
- user_entered_student_id = sc.nextLine();
- con = DriverManager.getConnection("jdbc:mysql://localhost:3306/ClassSelector?autoReconnect=true&useSSL=false", "root", "!");
- String selectStudentFromIdQuery = ("SELECT student_name FROM ClassSelector.students WHERE student_id = " + user_entered_student_id);
- myStmt = con.prepareStatement(selectStudentFromIdQuery);
- rs = myStmt.executeQuery(selectStudentFromIdQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement