CREATE TABLE IF NOT NOT EXISTS ban
(
UID
int(4)NOT NULL,
AdminUID
int(4)NOT NULL,
Grund
varchar(50)NOT NULL,
Datum
varchar(50)NOT NULL,
IP
varchar(50)NOT NULL DEFAULT' 0',
Serial
varchar(50)NOT NULL,
Eintragsdatum
时间戳NOT NULL DEFAULT CURRENT_TIMESTAMP,
STime
int(11)NOT NULL DEFAULT' 0'
,
PRIMARY KEY(UID
),
KEY Name
(Name
),
KEY IP
(IP
),
KEY Serial
(Serial
),
KEY STime
(STime
)
)ENGINE = MyISAM DEFAULT CHARSET = latin1;
错误:
我的错在哪里?
答案 0 :(得分:0)
删除代码中的KEY Name(Name),因为表中没有Name字段。
CREATE TABLE IF NOT EXISTS ban (
UID int(4) NOT NULL,
AdminUID int(4) NOT NULL,
Grund varchar(50) NOT NULL,
Datum varchar(50) NOT NULL,
IP varchar(50) NOT NULL DEFAULT '0',
Serial varchar(50) NOT NULL,
Eintragsdatum timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
STime int(11) NOT NULL DEFAULT '0' , PRIMARY KEY (UID), KEY IP (IP), KEY Serial (Serial), KEY STime (STime) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;