Nick99 Posted June 13, 2008 Share Posted June 13, 2008 here is what I'm using INSERT INTO users (username, password, desc, postcount, type, email) VALUES('sa', 'sa', 'sa', '1', 'sa', 'sa') It keeps giving me error 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 'desc, postcount, type, email) VALUES('sa', 'sa', 'sa', '1', 'sa', 'sa')' at line 1 I'm doing this through the mysql query browser, because it didn't work in PHP. Link to comment Share on other sites More sharing options...
Wander Posted June 13, 2008 Share Posted June 13, 2008 desc is reserved keyword in sql, put the fields between ``, so u get:INSERT INTO `users`(`username`,`password`,`desc`,`postcount`,`type`,`email) VALUES('sa','sa','sa','1','sa','sa'); Link to comment Share on other sites More sharing options...
Nick99 Posted June 13, 2008 Author Share Posted June 13, 2008 INSERT INTO 'users' ('username', 'password', 'desc', 'postcount', 'type', 'email') VALUES ('username', 'password', 'None.', 'Member', 'email') Still gives me errors Link to comment Share on other sites More sharing options...
Wander Posted June 13, 2008 Share Posted June 13, 2008 u now do them between single-quotes: ''you should use these: ``theyre on most keyboards above the tab-button, left of the 1-button Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.