What is MAPI? MAPI is a new API that allows developers who aren’t familiar with MySQL to use databases with ease! Like the logo? It was made by SzymonOwca!
Examples
Showing User Balance
If you wanted to get a user’s balance from mysql, you would do this:
MAPI.connect("localhost", "db_admin", "abc123", "minecraft");int balance = MAPI.selectInt("userData", "user", p.getName(), "balance");MAPI.disconnect();Usage
Connect
MAPI.connect("localhost", "databaseName", "username", "password");Disconnect
MAPI.disconnect();
Getting Values
MAPI.selectString("tableName", "criteria", "criteriaValue", "columnName");MAPI.selectInt("tableName", "criteria", "criteriaValue", "columnName");MAPI.selectBool("tableName", "criteria", "criteriaValue", "columnName");Inserting Values
MAPI.insertString("tableName", "column array", "values array");MAPI.insertInt("tableName", "column array", "values array");MAPI.insertBool("tableName", "column array", "values array");Deleting Values
MAPI.delete("tableName", "criteria", "criteriaValue");Updating Values
MAPI.update("tableName", "criteria", "criteriaValue", "columnName", "columnValue");Using MAPI
MAPI mapi;mapi = new MAPI();
Found a Bug?
Open a ticket so that the developer has more of a chance of responding!
MAPI Plugin 1.6.4 Download Links
http://www.dl2.9minecraft.net/index.php?act=dl&id=1390364282
http://www.dl5.9minecraft.net/index.php?act=dl&id=1390390582
Không có nhận xét nào:
Đăng nhận xét