Advertisement
Guest User

Untitled

a guest
May 3rd, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. public static void createTable() {
  2. try {
  3. con.prepareStatement("CREATE TABLE IF NOT EXISTS coinTable (UUID VARCHAR(100), coins INT(16))").executeUpdate();
  4. } catch (SQLException e) {
  5. e.printStackTrace();
  6. }
  7. }
  8.  
  9. //"con" ist das hier:
  10.  
  11. public static Connection con;
  12.  
  13. public static void connect() {
  14. if(!isConnected()) {
  15. try {
  16. con = DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/coins?autoReconnect=true", "kd12543-4", "E17dGu43YTSSxM"); //Hier connected der Server sich
  17. } catch (SQLException e) {
  18. e.printStackTrace();
  19. }
  20.  
  21. }
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement