Get/put something out from SQL

Discussion in 'Plugin Development' started by CarlOnMyDuty, Mar 1, 2013.

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

    CarlOnMyDuty

    Hey!

    I'm developing a plugin that is gonna include SQL in it. I don't want to run it with custom files, when this is not be best way to save and load objects on.

    I'm wondering if anybody knows how i shoud get the data out of a table, where I want to get the "amount" from the "player".

    I'm also wondering how I should put an specific amount to the "amount", and add the playerName to "player" statements.

    Thanks.
     
  2. Offline

    chasechocolate

    You should watch some of thenewboston's SQL syntax tutorials (on YouTube).
     
  3. Offline

    EvilKanoa

    Step 1, learn SQL, took me about 3-5 hours, now its easy, I learned from thenewbostons youtubw.
    Step 2, look up JDBC, learn how to use it.
    Step 3:
    I) get a new connection to the database
    II) Use SQL SELECT to get the data
    III) Add that data to maybe a
    A) hashmap
    B) set
    C) list
    IV)????????
    V) Profit!!!
     
  4. Maybe you are interested in the bukkits database layer ebean orm as well. I don't even know why most people don't use it.
     
  5. I prefer the Java Persistence Library that is included with bukkit. This means you can either use the built in SQLite or configure the server to use mySQL. Then you only work with objects, not tables. I find it easier to use but it might take longer to learn.
     
  6. Learning annotations instead of SQL looks more easy for me ;) especially if you have never worked with a query based language before.
     
  7. Offline

    -_Husky_-

Thread Status:
Not open for further replies.

Share This Page