Sql problem error

Discussion in 'MySQL' started by bloon, Dec 6, 2008.

  1. #1
    Hi,

    I am trying to import the database, however I've got this problem :

    
    
    Error
    
    SQL query:
    
    INSERT INTO `games` ( `gametitle` , `gamedesc` , `gamefile` , `gameheight` , `gamewidth` , `category` `iconlocation` )
    VALUES (
    'Acne Be Gone', 'Pop as many zits and pimples as you can before the timer hits zero.', '1.swf', 500, 400, 106, '1.png'
    );
    
    MySQL said: Documentation
    #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 '`iconlocation`) VALUES ('Acne Be Gone', 'Pop as many zits and pimples as you can' at line 1 
    
    Code (markup):
    Any expert here how to fix it?
     
    bloon, Dec 6, 2008 IP
  2. makeAwish

    makeAwish Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    there seems to be syntax error , you should use insert statement like this:

    insert into Citylist (cityname) VALUES ('St. John\'s')

    and your quesry should be like that :

    INSERT INTO games (gametitle , gamedesc , gamefile , gameheight , gamewidth , category, iconlocation)
    VALUES (
    'Acne Be Gone', 'Pop as many zits and pimples as you can before the timer hits zero.', '1.swf', 500, 400, 106, '1.png'
    );
     
    makeAwish, Dec 6, 2008 IP
  3. mji2010

    mji2010 Active Member

    Messages:
    762
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #3
    you are missing a comma right here -----> category` `iconlocation` )

    between category and iconlocation
     
    mji2010, Dec 7, 2008 IP