Advertisement
MrGG4ming

Untitled

Feb 11th, 2017
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. try {
  2. PreparedStatement st = MySql.con.prepareStatement("SELECT * FROM homes1_data");
  3. ResultSet rs = st.executeQuery();
  4. while (rs.next()) {
  5. while (rs.next()) {
  6. String UUID = rs.getString("UUID");
  7. String name = rs.getString("home1name");
  8. int p1x = rs.getInt("p1x");
  9. int p1y = rs.getInt("p1y");
  10. int p1z = rs.getInt("p1z");
  11. int p2x = rs.getInt("p2x");
  12. int p2y = rs.getInt("p2y");
  13. int p2z = rs.getInt("p2z");
  14. double spawnhome1 = rs.getDouble("spawnhome");
  15. String convidado1 = rs.getString("convidado1");
  16. String convidado2 = rs.getString("convidado2");
  17. String convidado3 = rs.getString("convidado3");
  18. String convidado4 = rs.getString("convidado4");
  19. String convidado5 = rs.getString("convidado5");
  20.  
  21. Region regions = new Region(UUID, name, p1x, p1y, p1z, p2x, p2y, p2z, spawnhome1,
  22. convidado1, convidado2, convidado3, convidado4, convidado5).insert();
  23.  
  24. //Here saving the mysql information in the ArrayList
  25. Region.getRegions().add(regions);
  26. }
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement