DROP TABLE IF EXISTS '##__exam_sc';
CREATE TABLE '##__exam_sc'{
 'id' int(11) NOT NULL auto_increment,
 'userid' varchar(20) NOT NULL,
 'title' text NOT NULL,
 'type' smallint(6) NOT NULL default '0',
 'upid' int(11) NOT NULL default '0',
 'xuanxiang' text NOT NULL,
 'daan' text NOT NULL,
 'jieda' text NOT NULL,
  PRIMARY KEY  ('id'),
  FOREIGN KEY (userid) REFERENCES ##__exam_admin(userid)
}ENGINE=MyISAM  DEFAULT CHARSET=gbk;

解决方案 »

  1.   

    DROP TABLE IF EXISTS '##__exam_sc'; 
    CREATE TABLE '##__exam_sc'(
    'id' int(11) NOT NULL auto_increment, 
    'userid' varchar(20) NOT NULL, 
    'title' text NOT NULL, 
    'type' smallint(6) NOT NULL default '0', 
    'upid' int(11) NOT NULL default '0', 
    'xuanxiang' text NOT NULL, 
    'daan' text NOT NULL, 
    'jieda' text NOT NULL, 
      PRIMARY KEY  ('id'), 
      FOREIGN KEY (userid) REFERENCES ##__exam_admin(userid) 
    )ENGINE=MyISAM  DEFAULT CHARSET=gbk;
    {改成)
      

  2.   

    IF EXISTS '##__exam_sc'
      

  3.   

    create table 的{} 改成()