Save statistics to MySQL help

Discussion in 'Spigot Plugin Development' started by Irantwomiles, Apr 17, 2017.

  1. I have a practice plugin that has a few fields that I want to save to MySQL or any other type of database (if you think I should use one over the other). It starts off with the players UUID, then there is a GameType field, and elo (or rank). How would I go about saving the UUID and each different gametype assigned with it's own elo. Do I need a new database per user (I don't think I do, because that seems just wrong), I'm just lost, any help would be useful.
  2. You'd just want to create a sql table and store a row for each player. You can interact with with the table simply using jdbc, or with a library like jdbi or jooq.

    You're going to want to learn at least the fundamentals of sql first. Oracle has a good getting started page for jdbc.