mysql syntax error
i took this straight from Robouk's tutorials
..entered it into phpmyadmin's sql querries page, and it gave me this error
CREATE TABLE user (
ID smallint(3) NOT NULL auto_increment,
Name varchar(30) NOT NULL default '',
Password varchar(32) NOT NULL default '',
PRIMARY KEY (ID),
UNIQUE KEY Name (Name)
can someone help me find the error and set up this table (for user login/registration)
CREATE TABLE user( ID smallint( 3 ) NOT NULL AUTO_INCREMENT , Name varchar( 30 ) NOT NULL default '', PASSWORD varchar( 32 ) NOT NULL default '', PRIMARY KEY ( ID ) , UNIQUE KEY Name( Name ) ) TYPE = MYISAM
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 'user( ID smallint( 3 ) NOT NULL AUTO_INCREMENT , Name varch
I tried it on my set up and have to say it worked fine without problems. I can not see anything wrong with the syntax.
Would you like to indulge a little more information such as your setup/configuration, operating sytem, server and so on. I don't know if it will make a huge difference but there just might be something in there to tell us.
forgot to mension i'm using mysql4, not 3.
however. i no longer need that query. (i wish i knew how to delete my thread). thanks for your time.