Library to make MySQL JDBC easier
- MySQL JDBC Driver
- Add library by jar/folder or copy
galuhfolder to your package - Set the configuration in one place or
main method*once enough!
- host : localhost
- port : 3306
- database :
- username : root
- password :
String id = DB.data.getString("id") SQL data Container
DB.query("SELECT * FROM TEST") get data from SQL
DB.execute("INSERT INTO test (id, name) VALUES(NULL, 'Galuh')"); execute query to manipulating MySQL datas
DB.data.setHost("localhost") DB.data.setPort(3306) DB.data.setDatabase("test") DB.data.setUsername("root") DB.data.setPassword("") DB.query("SELECT * FROM test"); while (DB.data.next()) { System.out.println(DB.data.getString("id")); } DB.execute("DELETE FROM test WHERE id = 1"); - email : galuh.ramaditya@gmail.com