Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public ResultSet query(String ip, String tabela, String user, String haslo, String query){
- try {
- Class.forName("com.mysql.jdbc.Driver");
- System.out.println("jdbc:mysql://" + ip + "/" + tabela + "," + user + "," + haslo);
- Connection con = DriverManager.getConnection("jdbc:mysql://" + ip + "/" + tabela, user, haslo);
- Statement stmt = con.createStatement();
- ResultSet rs = stmt.executeQuery(query);
- return rs;
- } catch(Exception e){}
- return null;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement