Can someone help,, mysql error when inserting

Discussion in 'MySQL' started by q8uwait, Oct 14, 2007.

  1. #1
    Hello,

    Everytime I try to import this sql code

    INSERT INTO `games` (`gId` ,`gInCategory` ,`gSwfFile` ,`gName` ,`gOrder` ,`gVisible` ,`gThumb` ,`gWidth` ,`gHeight` ,`gDescription` ,`gplays` ,`description2` ,`sponsor_name` ,`sponsor_link`) VALUES (2,101,'1221.swf','12 Many',0,1,'1221.png',480,360,'The screen flashes quickly and it ask you how many stars you seen. Can get quite challenging.',0,'','',''), 
    Code (markup):
    I get the following error

    MySQL said:

    #1064 - 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


    Is there is any problems with the code above.

    Thanks
     
    q8uwait, Oct 14, 2007 IP
  2. SirBlogger

    SirBlogger Active Member

    Messages:
    96
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    58
    #2
    the comma at the end could be a problem if there is no code after it..
     
    SirBlogger, Oct 15, 2007 IP
  3. it career

    it career Notable Member

    Messages:
    3,562
    Likes Received:
    155
    Best Answers:
    0
    Trophy Points:
    270
    #3
    Replace last , after ) by ; and check
     
    it career, Oct 15, 2007 IP
  4. q8uwait

    q8uwait Peon

    Messages:
    67
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks that worked great .. was the comma
     
    q8uwait, Oct 15, 2007 IP