KingOfHeart Posted May 8, 2010 Share Posted May 8, 2010 I'm getting this mysql error and I don't know why. "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 ' Values('test')' at line 1" ....................... Anything wrong with this line below? mysql_query("Insert INTO Uploads (username), Values('test')") or die(mysql_error()); Quote Link to comment Share on other sites More sharing options...
ignace Posted May 9, 2010 Share Posted May 9, 2010 remove the comma after (username) Quote Link to comment Share on other sites More sharing options...
Matthias_ Posted May 9, 2010 Share Posted May 9, 2010 Small sidenote, why isn't INSERT big? If you want to make the keywords big, make them all big . Quote Link to comment Share on other sites More sharing options...
ignace Posted May 9, 2010 Share Posted May 9, 2010 Small sidenote, why isn't INSERT big? If you want to make the keywords big, make them all big . Or go for something more eccentric, like: inserT InTO uPLOADS (uSeRnAmE) VaLuEs (teST) So you are sure it becomes really hard to read Quote Link to comment Share on other sites More sharing options...
KingOfHeart Posted May 10, 2010 Author Share Posted May 10, 2010 Ahh, so that's why it didn't work. I had a longer script and never noticed that comma being there so thanks. 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.