Solved MySQL what is wrong with this line of code?

Discussion in 'Plugin Development' started by beanonaboard, Apr 9, 2014.

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

    beanonaboard

    Hi I just cannot work it out but the stacktrace keeps telling me it is this line of code that is wrong.
    i have tried formating but still cannot get it to work. All help would be greatly appreciated it!

    Code:java
    1. s.executeUpdate("CREATE TABLE IF NOT EXISTS 'PlayerStats' ('name' varchar(32), 'LevelXP' int)");
    2.  
     
  2. Offline

    Alshain01

    Too many quotes there, try this

    Code:java
    1. s.executeUpdate("CREATE TABLE IF NOT EXISTS PlayerStats (name VARCHAR(32), LevelXP INT);");

    Also was missing the internal semicolon which may have been the actual problem, not sure if the quotes are allowed.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
    angelofdev likes this.
  3. Offline

    beanonaboard

    THANK YOU been trying for ages to get it to work!!!
     
Thread Status:
Not open for further replies.

Share This Page