Gluten Posted January 10, 2008 Share Posted January 10, 2008 Hi everyone, First time posting so bare with me =) For some reason this Insert will not work no matter how much tinkering I do. I've stared at this query for about two days and nothing has jumped out at me. INSERT INTO game_stats( GameName, Keywords, PublisherID, DeveloperID, Genre, Price, Requirements, Recommended, Multiplayer, ESRB, Gamestop, GameURL, Release, TentRelease, Platform, Description, UserID ) VALUES ( 'Guitar Hero III: Legends of Rock', 'harmonix, guitar, music', '61', '92', 'Music', '89.99', 'Wii', 'Wii', '1-2 Players, Nintendo WFC Support', 'Teen', NULL , 'http://www.guitarhero.com', '2007-10-28', NULL , 'Nintendo Wii', 'Crank Up the Volume and prepare to rock around the globe with Guitar Hero III: Legends of Rock. Battle against some of the greatest legends to ever shred on a guitar and become one yourself. Take your shredding skills online against other Guitar Hero players from around the world. Grab your Guitar Hero Wireless Les Paul or Kramer Striker Guitar Controller and unleash your inner rock legend.', '2'); ) When I run this through the script or the mysql console I get the follow error. 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 'Release, TentRelease, Platform, Description, UserID)' at line 13 Thanks in advance! Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted January 10, 2008 Share Posted January 10, 2008 try this INSERT INTO game_stats( `GameName`, `Keywords`, `PublisherID`, `DeveloperID`, `Genre`, `Price`, `Requirements`, `Recommended`, `Multiplayer`, `ESRB`, `Gamestop`, `GameURL`, `Release`, `TentRelease`, `Platform`, `Description`, `UserID` ) VALUES ( 'Guitar Hero III: Legends of Rock', 'harmonix, guitar, music', '61', '92', 'Music', '89.99', 'Wii', 'Wii', '1-2 Players, Nintendo WFC Support', 'Teen', NULL , 'http://www.guitarhero.com', '2007-10-28', NULL , 'Nintendo Wii', 'Crank Up the Volume and prepare to rock around the globe with Guitar Hero III: Legends of Rock. Battle against some of the greatest legends to ever shred on a guitar and become one yourself. Take your shredding skills online against other Guitar Hero players from around the world. Grab your Guitar Hero Wireless Les Paul or Kramer Striker Guitar Controller and unleash your inner rock legend.', '2'); ) Quote Link to comment Share on other sites More sharing options...
Gluten Posted January 10, 2008 Author Share Posted January 10, 2008 No good with that either this is what I got with that change. INSERT INTO game_stats( 'GameName', 'Keywords', 'PublisherID', 'DeveloperID', 'Genre', 'Price', 'Requirements', 'Recommended', 'Multiplayer', 'ESRB', 'Gamestop', 'GameURL', 'Release', 'TentRelease', 'Platform', 'Description', 'UserID' ) VALUES ( 'Guitar Hero III: Legends of Rock', 'harmonix, guitar, music', '61', '92', 'Music', '89.99', 'Wii', 'Wii', '1-2 Players, Nintendo WFC Support', 'Teen', NULL , 'http://www.guitarhero.com', '2007-10-28', NULL , 'Nintendo Wii', 'Crank Up the Volume and prepare to rock around the globe with Guitar Hero III: Legends of Rock. Battle against some of the greatest legends to ever shred on a guitar and become one yourself. Take your shredding skills online against other Guitar Hero players from around the world. Grab your Guitar Hero Wireless Les Paul or Kramer Striker Guitar Controller and unleash your inner rock legend.', '2' ) 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 ''GameName', 'Keywords', 'PublisherID', 'DeveloperID', 'Genre', 'Price', 'Require' at line 1 Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted January 10, 2008 Share Posted January 10, 2008 its "`" character not single quote Quote Link to comment Share on other sites More sharing options...
Gluten Posted January 10, 2008 Author Share Posted January 10, 2008 That did it! Out of curiousity was this a recent change to mySQL? Since all of my scripts worked about 5-6 months ago then I revisited my scripts and few things are working correctly which I assume is the same problem. Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted January 10, 2008 Share Posted January 10, 2008 No actually the errors is because one of your column names is a reserved keyword.. Quote Link to comment Share on other sites More sharing options...
Gluten Posted January 10, 2008 Author Share Posted January 10, 2008 But that's the thing, this query hasn't changed in over a year. Six months ago it was working without any problems, then, I assume, my service provider updated some software and I come back to this not working. Quote Link to comment Share on other sites More sharing options...
fenway Posted January 10, 2008 Share Posted January 10, 2008 RELEASE was not a reserved keyword in 4.1, but is in 5.0 -- and if your provided blindly upgraded your DB without telling you, I'd be very concerned. Quote Link to comment Share on other sites More sharing options...
Gluten Posted January 11, 2008 Author Share Posted January 11, 2008 Ahh that makes sense. I am sure they notified us, I'm just not on that list for notification =) You'd think I be. Thanks everyone!!! Quote Link to comment Share on other sites More sharing options...
fenway Posted January 11, 2008 Share Posted January 11, 2008 Ahh that makes sense. I am sure they notified us, I'm just not on that list for notification =) You'd think I be. Thanks everyone!!! What I mean what that there were "incomptable changes" between versions, so it could have affected your data and your queries! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.