Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void cek(int port){
- try {
- Class.forName("com.mysql.jdbc.Driver");
- java.sql.Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/jaringan","root","");
- java.sql.Statement st = con.createStatement();
- String query = "select * from port where id_port ="+port;
- ResultSet rs = st.executeQuery(query);
- rs.next();
- System.out.println(rs);
- if(rs.next()==false){
- // tmbh();
- System.out.println("ugh");
- }
- else if(rs.getString(3) != null )
- {
- pc();
- }else if(rs.getString(2)!=null){
- sw1();
- }
- }catch(Exception e){
- System.out.println(e.getMessage());
- }
- }
Add Comment
Please, Sign In to add comment