Nick99 Posted June 13, 2008 Report 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 Report 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 Report 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 Report 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
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now