Jump to content
xisto Community
Sign in to follow this  
Chatz

My Sql Error after uploading Need help regarding to this sql file

Recommended Posts

Ive uploaded this sql file to my database but it seems to have an error which i cant find.please help me find the error.The eroor says:

 

SQL query:

 

UNIQUE KEY id( 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 'UNIQUE KEY id (id)

) TYPE=MyISAM' at line 1

 


SQL FILE

 

 

 

CREATE TABLE banned (  username varchar(16) NOT NULL default '',  reason varchar(100) NOT NULL default '',  banner varchar(16) NOT NULL default '') TYPE=MyISAM;CREATE TABLE buddylist (  id bigint(6) NOT NULL auto_increment,  username1 varchar(13) default NULL,  username2 varchar(13) default NULL,  PRIMARY KEY  (id),  UNIQUE KEY id (id)) TYPE=MyISAM;CREATE TABLE chat (  id bigint(12) NOT NULL auto_increment,  username varchar(14) NOT NULL default '',  type tinyint(7) NOT NULL default '0',  towhere varchar(15) NOT NULL default '',  message varchar(170) NOT NULL default '',  PRIMARY KEY  (id)) TYPE=MyISAM;CREATE TABLE chatusers (  id mediumint(5) NOT NULL auto_increment,  username varchar(15) NOT NULL default '',  where_they varchar(15) NOT NULL default '',  time varchar(10) NOT NULL default '',  PRIMARY KEY  (id)) TYPE=MyISAM;CREATE TABLE devices (  id mediumint(7) NOT NULL auto_increment,  deviceid varchar(10) NOT NULL default '',  PRIMARY KEY  (id)) TYPE=MyISAM;CREATE TABLE forum (  id mediumint(4) NOT NULL auto_increment,  username varchar(10) default NULL,  date datetime default NULL,  lastreply datetime default NULL,  reply_amount smallint(5) unsigned default NULL,  subject varchar(20) default NULL,  message varchar(150) default NULL,  forum varchar(40) default NULL,  haspoll varchar(5) NOT NULL default 'no',  pass varchar(22) NOT NULL default '',  choices varchar(8) NOT NULL default '',  views varchar(5) NOT NULL default '0',  locked tinyint(2) NOT NULL default '0',  PRIMARY KEY  (id),  UNIQUE KEY id (id)) TYPE=MyISAM; CREATE TABLE forumindex (  id mediumint(5) NOT NULL auto_increment,  forum varchar(10) NOT NULL default '',  position smallint(3) NOT NULL default '0',  access char(2) NOT NULL default '',  display varchar(20) NOT NULL default '',  KEY id (id)) TYPE=MyISAM;CREATE TABLE forumpoll (  id mediumint(10) NOT NULL auto_increment,  question varchar(200) NOT NULL default '',  choice1 varchar(50) NOT NULL default '',  choice2 varchar(50) NOT NULL default '',  choice3 varchar(50) NOT NULL default '',  choice4 varchar(50) NOT NULL default '',  choice5 varchar(50) NOT NULL default '',  result1 varchar(6) NOT NULL default '',  result2 varchar(6) NOT NULL default '',  result3 varchar(6) NOT NULL default '',  result4 varchar(6) NOT NULL default '',  result5 varchar(6) NOT NULL default '',  pass varchar(22) NOT NULL default '',  PRIMARY KEY  (id)) TYPE=MyISAM;CREATE TABLE highest (  id char(3) NOT NULL default '',  highest mediumint(4) NOT NULL default '0') TYPE=MyISAM;CREATE TABLE hits (  page varchar(15) NOT NULL default '',  hits mediumint(23) NOT NULL default '0') TYPE=MyISAM;CREATE TABLE ignorelist (  id mediumint(6) NOT NULL auto_increment,  username1 varchar(13) default NULL,  username2 varchar(13) default NULL,  PRIMARY KEY  (id),  UNIQUE KEY id (id)) TYPE=MyISAM;CREATE TABLE inbox (  id mediumint(200) NOT NULL auto_increment,  from_who varchar(12) NOT NULL default '',  to_who varchar(12) NOT NULL default '',  title varchar(15) NOT NULL default '',  message blob NOT NULL,  been_read varchar(5) NOT NULL default 'no',  archive varchar(5) NOT NULL default 'no',  date datetime NOT NULL default '0000-00-00 00:00:00',  password2 varchar(12) NOT NULL default '',  PRIMARY KEY  (id)) TYPE=MyISAM;CREATE TABLE latest (  ip varchar(15) NOT NULL default '',  time int(15) NOT NULL default '0',  cameonline int(15) NOT NULL default '0') TYPE=MyISAM;CREATE TABLE members (  id mediumint(7) NOT NULL auto_increment,  username varchar(10) NOT NULL default '',  password varchar(10) NOT NULL default '',  owner tinyint(2) NOT NULL default '0',  admin tinyint(2) NOT NULL default '0',  stars tinyint(2) NOT NULL default '0',  forumadmin tinyint(2) NOT NULL default '0',  banned tinyint(2) NOT NULL default '0',  phone varchar(120) NOT NULL default '',  subno varchar(90) NOT NULL default '',  registerdate datetime NOT NULL default '0000-00-00 00:00:00',  lastloggedin datetime NOT NULL default '0000-00-00 00:00:00',  lastpost varchar(15) NOT NULL default '',  email varchar(30) NOT NULL default '',  validation tinyint(2) NOT NULL default '0',  fp tinyint(2) NOT NULL default '0',  ban tinyint(2) NOT NULL default '0',  unban tinyint(2) NOT NULL default '0',  deletem tinyint(2) NOT NULL default '0',  deletepms tinyint(2) NOT NULL default '0',  pass tinyint(2) NOT NULL default '0',  pmname varchar(15) NOT NULL default 'P.M',  buddyname varchar(10) NOT NULL default 'Buddy',  validated varchar(4) NOT NULL default 'no',  visit mediumint(22) NOT NULL default '0',  device varchar(10) NOT NULL default '',  PRIMARY KEY  (id),  UNIQUE KEY username (username)) TYPE=MyISAM;CREATE TABLE mood (  id mediumint(6) NOT NULL auto_increment,  username varchar(14) default NULL,  mood varchar(50) default NULL,  PRIMARY KEY  (id),  UNIQUE KEY id (id)) TYPE=MyISAM;CREATE TABLE notify (  id mediumint(10) NOT NULL auto_increment,  username1 varchar(17) NOT NULL default '',  username2 varchar(17) NOT NULL default '',  PRIMARY KEY  (id)) TYPE=MyISAM;CREATE TABLE outbox (  id mediumint(200) NOT NULL auto_increment,  from_who varchar(12) NOT NULL default '',  to_who varchar(12) NOT NULL default '',  title varchar(15) NOT NULL default '',  message blob NOT NULL,  been_read varchar(5) NOT NULL default 'no',  archive varchar(5) NOT NULL default 'no',  date datetime NOT NULL default '0000-00-00 00:00:00',  password2 varchar(12) NOT NULL default '',  PRIMARY KEY  (id)) TYPE=MyISAM;CREATE TABLE privatemessage (  id bigint(6) NOT NULL auto_increment,  to_username varchar(11) default NULL,  from_username varchar(11) default NULL,  date_sent datetime default NULL,  has_it_been_read varchar(16) default NULL,  pm_message varchar(200) default NULL,  PRIMARY KEY  (id),  UNIQUE KEY id (id)) TYPE=MyISAM;CREATE TABLE profile (  id mediumint(7) NOT NULL auto_increment,  username varchar(10) NOT NULL default '',  name varchar(10) NOT NULL default '',  age smallint(3) NOT NULL default '0',  sex varchar(7) NOT NULL default '',  location varchar(12) NOT NULL default '',  about varchar(200) NOT NULL default '',  picture varchar(100) NOT NULL default '',  onlinetime bigint(255) NOT NULL default '0',  PRIMARY KEY  (id)) TYPE=MyISAM;CREATE TABLE replies (  id bigint(4) NOT NULL auto_increment,  subject_id varchar(10) default NULL,  username varchar(15) default NULL,  date datetime default NULL,  reply_number smallint(5) unsigned default NULL,  message varchar(150) default NULL,  forum varchar(40) default NULL,  PRIMARY KEY  (id)) TYPE=MyISAM;CREATE TABLE shoutbox (  id tinyint(4) NOT NULL auto_increment,  name varchar(10) default NULL,  message varchar(150) default NULL,  PRIMARY KEY  (id),  UNIQUE KEY id (id)) TYPE=MyISAM;

Notice from BuffaloHELP:
Using proper bbcode is part of Xisto forum rules. Next time will result in warning.

Share this post


Link to post
Share on other sites

hi dear Chatz
i think at banned tabel you dont have a UNIQUE KEY id its your code

CREATE TABLE banned (  username varchar(16) NOT NULL default '',  reason varchar(100) NOT NULL default '',  banner varchar(16) NOT NULL default '') TYPE=MyISAM;


change it to this :
CREATE TABLE banned (  id bigint(6) NOT NULL auto_increment,  username varchar(16) NOT NULL default '',  reason varchar(100) NOT NULL default '',  banner varchar(16) NOT NULL default '') TYPE=MyISAM;

Have good time

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.