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()); Link to comment https://forums.phpfreaks.com/topic/201129-im-confused/ Share on other sites More sharing options...
ignace Posted May 9, 2010 Share Posted May 9, 2010 remove the comma after (username) Link to comment https://forums.phpfreaks.com/topic/201129-im-confused/#findComment-1055267 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 . Link to comment https://forums.phpfreaks.com/topic/201129-im-confused/#findComment-1055314 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 Link to comment https://forums.phpfreaks.com/topic/201129-im-confused/#findComment-1055378 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. Link to comment https://forums.phpfreaks.com/topic/201129-im-confused/#findComment-1055644 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.