Jump to content

Mysql keeps giving me errors, help


Nick99

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...