Record SQL Data in Bukkit Coding (Run Queries)

Discussion in 'Plugin Development' started by chris4315, Feb 2, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    chris4315

    Hello. I'm currently creating a plugin along with another developer. I am the only one on the team that can use PHP and SQL pretty well so far. I am completely able to set up a leaderboards and base data from MySQL tables into the website. But I need this data to be able to be recorded from the plugin itself. Don't tell me it's not possible. Because I know it is possible indeed. I see these websites like evo-ctf.net and mcpvp.com that have it perfectly recorded in their databases. But why is it so difficult to find a tutorial on how to execute MySQL queries and INSERT INTO data to tables from Bukkit itself? Kind of like LogBlock. Is there any tutorial?

    Thanks. Please excuse my arrogance, it's just so frustrating...
     
  2. Offline

    EnvisionRed

    I don't think it would be done through bukkit, rather through Java. JDBC is a good lib for MySQL databases. If you use methods from it, you'll need to package it in the jar along with your code.
     
  3. Offline

    chasechocolate

  4. EnvisionRed
    Most of the tutorials are for database connection and executing queries, for Bukkit based stuff like this you will need to figure it out for yourself. If you look in the resources forum you can find some SQL libraries, my plugin Sync also provides an SQL library. As for how they work I suggest you look at the source code.

    Most work by just storing the coordinates, world, id and data of a block in an SQL table.
     
Thread Status:
Not open for further replies.

Share This Page