mdbc
[mdbc] - Simple MysqlDBConnection for your plugin
There is many plugins that using mysql. And EACH using OWN config and connection to db. I suggest this plugin, which connection can use any other plugin.
sample use:
import me.tabr.mysqldbconnection.MDBCMain; //+import sql u need ... MDBCMain mdbc = (MDBCMain)this.getServer().getPluginManager().getPlugin("mdbc"); mdbc.Test();//to test =) Statement s = mdbc.getStmt(); //and use statement as always =)
second sample use (v.0.2+ only)
import me.tabr.mysqldbconnection.MDBCMain; ... MDBCMain mdbc = (MDBCMain)this.getServer().getPluginManager().getPlugin("mdbc"); ArrayList<ArrayList<String>> result =mdbc.executeQuery("SELECT * FROM iConomy"); for (int i=0;i<result.size();i++) { ArrayList<String> result1 = result.get(i); String out=""; for (int j=0;j<result1.size();j++) { out+=result1.get(j)+" "; } log.info("[test] "+out); }
Features
- ping mysql implementation (so connection will not lost[i think])
- source included
Version History
- v.0.1.1 First public beta
- v.0.2 added ArrayList<ArrayList<String>> executeQuery and int executeUpdate methods,so u don't need include sql features and new config parameter "maxColIndex: 32". Don't fogret update config file!!!1
- v.0.3 normally unloads depend plugins
PS: don't forget to add 'depend: [mdbc]' to your 'plugin.yml'
PPS: sorry for my english
@Parideis
now =)
@tabr
where ist the download link?
@Parideis
try v.0.2.
Will it work if the plugin hasen't a mysql feature ?