今天第一次恢复备份的数据,uchome一直是错误,找其原因
后来某位版主的帖子让我得到问题所在,帖子里提到 uchome_doing创建的时候from改成`from`
注意这里不是单引号是1左边那个符号,波浪号一起的那个。(这里千万要注意)代码如下,具体在哪个分段就要你自己找了!
DROP TABLE IF EXISTS uchome_doing;
CREATE TABLE uchome_doing (
doid mediumint(8) unsigned NOT NULL auto_increment,
uid mediumint(8) unsigned NOT NULL default '0',
username varchar(15) NOT NULL default '',
dateline int(10) unsigned NOT NULL default '0',
message text NOT NULL,
ip varchar(20) NOT NULL default '',
`from` varchar(20) NOT NULL default '',
replynum int(10) unsigned NOT NULL default '0',
mood smallint(6) NOT NULL default '0',
PRIMARY KEY (doid),
KEY uid (uid,dateline),
KEY dateline (dateline)
) TYPE=MyISAM AUTO_INCREMENT=568;
另外两个地方也是出错的,从别的网站上百度搜到的解决方法,一样的问题,其实很简单就是创建字段的时候用了mysql的保留名
DROP TABLE IF EXISTS uchome_pollfield;
CREATE TABLE uchome_pollfield (
pid mediumint(8) unsigned NOT NULL default '0',
notify tinyint(1) NOT NULL default '0',
message text NOT NULL,
summary text NOT NULL,
`option` text NOT NULL,
invite text NOT NULL,
hotuser text NOT NULL,
PRIMARY KEY (pid)
) TYPE=MyISAM;
DROP TABLE IF EXISTS uchome_polloption;
CREATE TABLE uchome_polloption (
oid mediumint(8) unsigned NOT NULL auto_increment,
pid mediumint(8) unsigned NOT NULL default '0',
votenum mediumint(8) unsigned NOT NULL default '0',
`option` varchar(100) NOT NULL default '',
PRIMARY KEY (oid),
KEY pid (pid)
) TYPE=MyISAM AUTO_INCREMENT=1;
以上option中都加上了··符号,这样就没问题了
如果有问题,可以互相交流,我QQ 133588140
网站是 http://www.baby0552.com |