vidus Posted February 7, 2012 Share Posted February 7, 2012 Hello everyone. I have no idea why this insert command will not work. I have never had this problem before. I have been staring at it for a while now. I just do. not. get. it. Im hoping that im not going insane, and just missed something really stupid... The error: 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 'Long, Details) VALUES ('3','49.15732','-123.126751','Test spot')' at line 1 The command: $sql="INSERT INTO spots (Member, Lat, Long, Details) VALUES ('3','49.15732','-123.126751','Test spot')"; if (!mysql_query($sql,$dbhandle)) { die('Error: ' . mysql_error()); } echo header("Location: ../map.php"); Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted February 7, 2012 Share Posted February 7, 2012 LONG is a MySQL reserved word. http://dev.mysql.com/doc/refman/5.5/en/reserved-words.html Quote Link to comment Share on other sites More sharing options...
vidus Posted February 7, 2012 Author Share Posted February 7, 2012 LONG is a MySQL reserved word. http://dev.mysql.com/doc/refman/5.5/en/reserved-words.html Damnit. I should have checked that. I need more sleep. Thanks Pikachu2000... Quote Link to comment Share on other sites More sharing options...
fenway Posted February 7, 2012 Share Posted February 7, 2012 In general, don't use abbreviations. 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.