DROP TABLE IF EXISTS `{DB_TABLE_PREFIX}broadcast`;
#[QUERY]
CREATE TABLE `{DB_TABLE_PREFIX}broadcast` (
`bid` mediumint(8) NOT NULL auto_increment,
`sortid` mediumint(8) NOT NULL default '0',
`content` varchar(255) NOT NULL default '',
`gourl` varchar(255) NOT NULL default '#',
PRIMARY KEY (`bid`)
) TYPE=MyISAM {setCharset} AUTO_INCREMENT=1 ;
#[QUERY]
DROP TABLE IF EXISTS `{DB_TABLE_PREFIX}items`;
#[QUERY]
CREATE TABLE `{DB_TABLE_PREFIX}items` (
`itemid` mediumint(8) unsigned NOT NULL auto_increment,
`uid` mediumint(8) unsigned NOT NULL default '0',
`account` varchar(15) NOT NULL default '',
`content` varchar(255) NOT NULL default '',
`dateline` int(10) unsigned NOT NULL default '0',
`digg` mediumint(8) unsigned NOT NULL default '0',
`reply` mediumint(5) unsigned NOT NULL default '0',
PRIMARY KEY (`itemid`),
KEY `uid` (`uid`)
) TYPE=MyISAM {setCharset} AUTO_INCREMENT=1 ;
#[QUERY]
DROP TABLE IF EXISTS `{DB_TABLE_PREFIX}reply`;
#[QUERY]
CREATE TABLE `{DB_TABLE_PREFIX}reply` (
`rid` mediumint(8) NOT NULL auto_increment,
`replyto` mediumint(8) unsigned NOT NULL default '0',
`uid` mediumint(8) NOT NULL default '0',
`account` varchar(15) NOT NULL default '',
`content` varchar(255) NOT NULL default '',
`dateline` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`rid`),
KEY `uid` (`uid`),
KEY `replyto` (`replyto`)
) TYPE=MyISAM {setCharset} AUTO_INCREMENT=1 ;
#[QUERY]
DROP TABLE IF EXISTS `{DB_TABLE_PREFIX}setting`;
#[QUERY]
CREATE TABLE `{DB_TABLE_PREFIX}setting` (
`setname` varchar(255) NOT NULL default '',
`data` text NOT NULL,
PRIMARY KEY (`setname`)
) TYPE=MyISAM {setCharset} ;
我尝试将其导入mysql数据库并收到此错误
您的SQL语法有错误;检查手册 对应于您的MySQL服务器版本,以便使用正确的语法 靠近' {setCharset} AUTO_INCREMENT = 1'在第1行
我确实错过了什么吗?请帮帮我!
答案 0 :(得分:0)
替换
TYPE=MyISAM
通过
ENGINE=MYISAM
试试这个,我使用了表格前缀"t_"
DROP TABLE IF EXISTS `t_broadcast`;
CREATE TABLE `t_broadcast` (
`bid` MEDIUMINT(8) NOT NULL AUTO_INCREMENT,
`sortid` MEDIUMINT(8) NOT NULL DEFAULT '0',
`content` VARCHAR(255) NOT NULL DEFAULT '',
`gourl` VARCHAR(255) NOT NULL DEFAULT '#',
PRIMARY KEY (`bid`)
) ENGINE=MYISAM;
DROP TABLE IF EXISTS `t_items`;
CREATE TABLE `t_items` (
`itemid` MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT,
`uid` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
`account` VARCHAR(15) NOT NULL DEFAULT '',
`content` VARCHAR(255) NOT NULL DEFAULT '',
`dateline` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`digg` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
`reply` MEDIUMINT(5) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (`itemid`),
KEY `uid` (`uid`)
) ENGINE=MYISAM;
DROP TABLE IF EXISTS `t_reply`;
CREATE TABLE `t_reply` (
`rid` MEDIUMINT(8) NOT NULL AUTO_INCREMENT,
`replyto` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
`uid` MEDIUMINT(8) NOT NULL DEFAULT '0',
`account` VARCHAR(15) NOT NULL DEFAULT '',
`content` VARCHAR(255) NOT NULL DEFAULT '',
`dateline` INT(10) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (`rid`),
KEY `uid` (`uid`),
KEY `replyto` (`replyto`)
) ENGINE=MYISAM;
DROP TABLE IF EXISTS `t_setting`;
CREATE TABLE `t_setting` (
`setname` VARCHAR(255) NOT NULL DEFAULT '',
`data` TEXT NOT NULL,
PRIMARY KEY (`setname`)
) ENGINE=MYISAM ;
答案 1 :(得分:0)
试试这个:
CREATE TABLE `broadcast` (
`bid` mediumint(8) NOT NULL auto_increment,
`sortid` mediumint(8) NOT NULL default '0',
`content` varchar(255) NOT NULL default '',
`gourl` varchar(255) NOT NULL default '#',
PRIMARY KEY (`bid`)
) TYPE=MyISAM AUTO_INCREMENT=50 ;
大括号只是为了解释,因为你从其他来源那里审阅了语法。