Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package de.heu.craft.sql.bro;
- import java.sql.SQLException;
- import java.sql.Statement;
- import code.husky.mysql.MySQL;
- public class sqlmg {
- private final main mein;
- private MySQL db;
- public sqlmg(main h){
- this.mein = h;
- }
- public void setupDB() throws SQLException{
- this.db = new MySQL(this.mein,"127.0.0.1","3306","test",
- "test", "Asdfasdf1");
- this.db.getConnection();
- Statement statement = this.db.getConnection().createStatement();
- statement.executeUpdate("CREATE TABLE IF NOT EXISTS `test` (`name` varchar(32),`uses` int)");
- }
- public void closeDB() throws SQLException{
- this.db.closeConnection();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement