帝国cms网站迁移后,刷新静态页面,遇到报错:
Table ‘empirecms.phome_ecms_’ doesn’t exist
update ***_ecms_ set havehtml=1 where id=” limit 1
这是什么原因?怎么解决呢?万维景盛工程师为你分享答案。
这种情况一般是_news表与_news_data_1表内容不对应造成的。那么我们只需要看看哪些不对应,然后删掉不对应的数据,问题即可解决!
查询:
select id from phome_ecms_news where id not in (select id from phome_ecms_news_data_1)
SELECT `id` FROM `phome_ecms_news_index` WHERE `id` not in (SELECT `id` FROM `phome_ecms_news` )
删除不匹配的数据:
delete from phome_ecms_news where id not in (select id from phome_ecms_news_data_1)
delete from phome_ecms_news_data_1 where id not in (select id from phome_ecms_news)
DELETE FROM `phome_ecms_news_index` WHERE `id` not in (SELECT `id` FROM `phome_ecms_news` )