Solved MySQL syntax error is driving me crazy.

Discussion in 'Spigot Plugin Development' started by MaveCrit, Jun 10, 2017.

  1. Hey there,
    It seems that I have an error in my mysql syntax. But I cant find it. I dont fu*** find it.
    All my tables work, everything is fine. But this table not.

    Anyone who has a solution?
    This is the line where the error gets thrown:
    Code (Text):
    INSERT INTO interests (NAME, AUTHOR, DESCRIPTION, CATEGORY, WORLDNAME, XL, YL, ZL, D, ENABLED) VALUES ('" + identifier + "', '" + author + "', '" + desc + "', '" + cat + "', '" + world + "', '" + x + ", '" + y + "', '" + z + "', '" + day + "', '" + enabled + "');

    Error using this site http://sqlfiddle.com/
    Code (Text):
    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '')' at line 1
     
  2. Found it. Missed a " ' " at the x.
    upload_2017-6-10_20-30-29.png
     
    • Like Like x 1
  3. TomTheDeveloper

    Supporter

    On his grave: "How something such little as an aphostrophe can make you go crazy".

    I found this answer quite funny. You made my day MaveCrit! (At least 5 minutes of it )
     
    • Winner Winner x 1