Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import core.database.MySQL;
- public class Program {
- public static void main(String args[]) {
- /*if(MySQL.Open("localhost", "test", "root", "")) {
- System.out.println("Successfully connected to mysql database!");
- } else {
- System.exit(0);
- }*/
- /*MySQL.Insert("dudes", new String[]{"first_name", "last_name"}, new String[]{"asib", "tayeb"});
- System.out.println("Inserted into database!");*/
- /*MySQL.Query("UPDATE dudes SET first_name = 'jaweed' WHERE id = 1");
- System.out.println("Updated database!");*/
- String[][] results = MySQL.Read("dudes", new String[]{"id", "first_name", "last_name"}, null, null, 0);
- for(int i = 0; i < results.length; i++) {
- for(int x = 0; x < results[i].length; x++) {
- System.out.printf("%s ", results[i][x]);
- }
- System.out.println();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement