Closed xbhuang1994 closed 6 years ago
错误 SQL 查询:
CREATE TABLE nideshop_keywords ( keyword varchar(90) NOT NULL DEFAULT '', is_hot tinyint(1) unsigned NOT NULL DEFAULT '0', is_default tinyint(1) unsigned NOT NULL DEFAULT '0', is_show tinyint(1) unsigned NOT NULL DEFAULT '1', sort_order int(11) unsigned NOT NULL DEFAULT '100', scheme _url varchar(255) NOT NULL DEFAULT '' COMMENT '关键词的跳转链接', id int(11) NOT NULL AUTO_INCREMENT, type int(11) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (keyword,id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='热闹关键词表' MySQL 返回: 文档
nideshop_keywords
keyword
is_hot
is_default
is_show
sort_order
scheme _url
id
type
id 与 keyword 替换一个位置就解决了此问题
错误 SQL 查询:
CREATE TABLE
nideshop_keywords
(keyword
varchar(90) NOT NULL DEFAULT '',is_hot
tinyint(1) unsigned NOT NULL DEFAULT '0',is_default
tinyint(1) unsigned NOT NULL DEFAULT '0',is_show
tinyint(1) unsigned NOT NULL DEFAULT '1',sort_order
int(11) unsigned NOT NULL DEFAULT '100',scheme _url
varchar(255) NOT NULL DEFAULT '' COMMENT '关键词的跳转链接',id
int(11) NOT NULL AUTO_INCREMENT,type
int(11) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (keyword
,id
) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='热闹关键词表' MySQL 返回: 文档1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key