Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //helping method for getDoctorFromDB
- public static void initialize (Connection conn) {
- try {
- Statement stmt = conn.createStatement();
- ResultSet rs = stmt.executeQuery("select name, password, phoneNumber, hospital, idDoctor from doctor where username="+ "\""+username+"\"");
- while (rs.next()) {
- idDoctor= rs.getInt("idDoctor");
- name = rs.getString("name");
- password = rs.getString("password");
- phoneNumber = rs.getInt("phoneNumber");
- hospital = rs.getString("hospital");
- }
- } catch (Exception e) {
- System.out.println("db error during select of doctor= "+e);
- return;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement