升级数据库出现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 'DEFAULT CHARACTER SET gbk' at line 1错误的可以用下面的语句
演示
http://www.paoke8.com
----------------------------------分割线---------------------------------------
CREATE TABLE cdb_pig (
id mediumint(8) NOT NULL auto_increment,
usera char(15) NOT NULL default '',
userb char(15) NOT NULL default '',
type tinyint(2) NOT NULL default '0',
time tinyint(2) NOT NULL default '0',
status tinyint(1) NOT NULL default '0',
notools tinyint(1) NOT NULL default '0',
cdtime int(10) NOT NULL default '0',
starttime int(10) NOT NULL default '0',
overtime int(10) NOT NULL default '0',
KEY id (id),
KEY userb (userb)
) TYPE=MyISAM;
DROP TABLE IF EXISTS cdb_piglog;
CREATE TABLE cdb_piglog (
uid mediumint(8) unsigned NOT NULL DEFAULT '0',
pigusername char(15) NOT NULL DEFAULT '',
action tinyint(1) NOT NULL DEFAULT '0',
dateline int(10) unsigned NOT NULL DEFAULT '0',
price smallint(6) NOT NULL DEFAULT '0',
status tinyint(1) NOT NULL DEFAULT '0',
KEY uid (uid,action)
) TYPE=MyISAM;
ALTER TABLE cdb_memberfields ADD pighead varchar(15) NOT NULL DEFAULT ''; |