Jump to content

mysql table error


mark_18

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.