mark_18 Posted March 4, 2008 Share Posted March 4, 2008 CREATE TABLE users ( id int(11) NOT NULL auto_increment, username varchar(22) NOT NULL default '', password varchar(32) NOT NULL default '', email_address varchar(155) NOT NULL default '', nickname varchar(255) NOT NULL default '', user_level enum('0','1','2','3','4',5') NOT NULL default '0', forum_posts int(11) NOT NULL default '0', profile text NOT NULL, siggy varchar(255) NOT NULL default '', last_post varchar(155) NOT NULL default '0', last_login varchar(12) NOT NULL default '0', style varchar(55) NOT NULL default '0', PRIMARY KEY (id) ) TYPE=MyISAM; this is the table im trying to import and ill post below the error its coming up There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem ERROR: Unclosed quote @ 552 STR: ' SQL: CREATE TABLE users ( id int(11) NOT NULL auto_increment, username varchar(22) NOT NULL default '', password varchar(32) NOT NULL default '', email_address varchar(155) NOT NULL default '', nickname varchar(255) NOT NULL default '', user_level enum('0','1','2','3','4',5') NOT NULL default '0', forum_posts int(11) NOT NULL default '0', profile text NOT NULL, siggy varchar(255) NOT NULL default '', last_post varchar(155) NOT NULL default '0', last_login varchar(12) NOT NULL default '0', style varchar(55) NOT NULL default '0', PRIMARY KEY (id) ) TYPE=MyISAM; SQL query: CREATE TABLE users ( id int(11) NOT NULL auto_increment, username varchar(22) NOT NULL default '', password varchar(32) NOT NULL default '', email_address varchar(155) NOT NULL default '', nickname varchar(255) NOT NULL default '', user_level enum('0','1','2','3','4',5') NOT NULL default '0', forum_posts int(11) NOT NULL default '0', profile text NOT NULL, siggy varchar(255) NOT NULL default '', last_post varchar(155) NOT NULL default '0', last_login varchar(12) NOT NULL default '0', style varchar(55) NOT NULL default '0', PRIMARY KEY (id) ) TYPE=MyISAM; MySQL said: #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 '5') NOT NULL default '0', forum_posts int(11) NOT NULL default '0', profil' at line 7 please help, thanks Quote Link to comment https://forums.phpfreaks.com/topic/94321-mysql-table-error/ Share on other sites More sharing options...
amites Posted March 7, 2008 Share Posted March 7, 2008 get rid of the coma that cames before your primary key command Quote Link to comment https://forums.phpfreaks.com/topic/94321-mysql-table-error/#findComment-485616 Share on other sites More sharing options...
mark_18 Posted March 7, 2008 Author Share Posted March 7, 2008 could u paste the fixed version for me please Quote Link to comment https://forums.phpfreaks.com/topic/94321-mysql-table-error/#findComment-485994 Share on other sites More sharing options...
richardw Posted March 7, 2008 Share Posted March 7, 2008 Hi, YOu are missing a ' before the 5 in your enum field CREATE TABLE users ( id int(11) NOT NULL auto_increment, username varchar(22) NOT NULL, password varchar(32) NOT NULL, email_address varchar(155) NOT NULL, nickname varchar(255) NOT NULL, user_level enum('0','1','2','3','4','5') default '0' NOT NULL, forum_posts int(11) default '0' NOT NULL, profile text NOT NULL, siggy varchar(255) NOT NULL, last_post varchar(155) NOT NULL, last_login varchar(12) NOT NULL, style varchar(55) NOT NULL, PRIMARY KEY (id) ) TYPE=MyISAM try this Quote Link to comment https://forums.phpfreaks.com/topic/94321-mysql-table-error/#findComment-486405 Share on other sites More sharing options...
mark_18 Posted March 7, 2008 Author Share Posted March 7, 2008 thanks richardw it worked a treat. much appreciated Quote Link to comment https://forums.phpfreaks.com/topic/94321-mysql-table-error/#findComment-486553 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.