帝国CMS后台更新数据出现:Table ‘xxx.phome_ecms_news_data_’ doesn’t exist
select keyid,dokey,newstempid,closepl,infotags,writer,befrom,newstext from ***_ecms_news_data_ where id=’169272′ limit 1报错,原因是之前从新闻表中删除了数据,但该数据的id信息在帝国索引表中还存在,所以无法生成,
解决方法:(操作前记得将数据库备份一下,以免出现问题可恢复)
1、可以先执行:delete from `phome_ecms_news_index` where id not in(select id from phome_ecms_news)删除索引表指定id
2、上面方法若还不行可使用:insert into phome_ecms_news_index(id,classid,newstime) select id,classid,newstime from phome_ecms_news
若上面语句执行后还有问题,可参考如下语句
insert into phome_ecms_news_index(id,classid,checked,newstime,truetime,lastdotime,havehtml) select id,classid,checked,newstime,truetime,lastdotime,havehtml from phome_ecms_news |
(里面的字段请根据自己的情况添加或修改)
标签: