
出现这错误:

另有一个表现就是,修改任何一篇文章,都显现链接不存正在,可是可以革新文章。
后台查看,ecms_news_index的记录数字,只有7个,远远小于ecms_news的记录数,正常情况下,两者应该是一样的。只是不知为何这表丢数据了。
查看字段后,发明除了checked字段中,别的字段可以从主表ecms_news中导出。所以...(做下列数据库操作之前请备份数据)
===重重死成新闻数据索引表=====
CREATE TABLE [!db.pre!]ecms_newstemp AS(SELECT id,classid,newstime,truetime,lastdotime,havehtml FROM [!db.pre!]ecms_news);
ALTER TABLE `[!db.pre!]ecms_newstemp` ADD COLUMN `checked` tinyint(1) not null DEFAULT 0 AFTER `classid`;
ALTER TABLE `[!db.pre!]ecms_newstemp` add primary key (id);
alter table [!db.pre!]ecms_news_index rename to [!db.pre!]ecms_news_indexbak;
alter table [!db.pre!]ecms_newstemp rename to [!db.pre!]ecms_news_index;
ALTER TABLE `[!db.pre!]ecms_news_index` CHANGE `id` `id` INT(10) NOT NULL AUTO_INCREMENT;
alter table [!db.pre!]ecms_news_index add index(classid);
alter table [!db.pre!]ecms_news_index add index(checked);
alter table [!db.pre!]ecms_news_index add index(newstime);
alter table [!db.pre!]ecms_news_index add index(truetime);
update [!db.pre!]ecms_news_index set checked=1;
====发起分条执止,一是防止超时,两是能发明错误====
转载请注明: 帝国模板 » 重建帝国cms数据索引表,用于ecms_news_index表损坏丧失或者错误
*
回帖描述:*
链接类型:*
下载链接:*
描述:*
回帖描述:*
链接类型:*
阅读权限:*
下载链接:



聚优部落技术论坛 © 版权所有 鲁ICP备15007479号-6
Copyright(C)web.com, All Rights Reserved.
