网络营销电子商务研究中心  
How to buy the best prescription safety glasses in Canada? Let's study!
Go Back   网络营销电子商务研究中心 > 网站建设 > CmsWare
User Name
Password
 
FAQ Members List Calendar Cheap Glasses

CmsWare 思维内容管理系统(CmsWare)介绍、技术支持、BUG反馈、发展建议以及模板技术等。

Reply
 
Thread Tools Display Modes
  #1   IP: 122.195.247.8
Old 2015-05-23, 07:00 AM
Kahlotus Kahlotus is offline
初级会员
 
Join Date: 2006-04-02
Posts: 1
Kahlotus 现在声名狼藉
Default 帝国cms7.0 数据更新批量生成时出错的解决方法

今天升级以后的帝国cms7.0在生成页面时出现了奇怪的错误

Code:
Table phome_ecms_news_data_' doesn't exist
select keyid,dokey,newstempid,closepl,infotags,writer,befrom,newstext from ***_ecms_news_data_ where id='1' limit 1
Table ‘表前缀_ecms_news_data_’ doesn't exist...

很明显这是提示表不存在,但是这个表名是错误的,他缺少了_1,正确的表名应是 表前缀_ecms_data_1 这样的

后面的_1是根据主表里的stb字段来设定的,看了主表phome_ecms_news 里的记录他的stb字段都是为1是正常的

但是发现主表里并没有出现这个错误的ID存在,我的情况是ID为118,但是主表里没有118这个ID了

后来发现帝国cms7.0的生成机制应该先读取phome_ecms_news_index这样的索引表,因为这个表里还存在118这个ID

主表里不存在自然就读取不到stb字段的内容也就会出现前文所说的问题了

我们已经知道的故障原因,还是自己解决吧,解决办法就是清理掉索引表里多余的信息


我用一个sql来解决

Code:
delete from `phome_ecms_news_index` where id not in(select id from phome_ecms_news)
帝国cms后台执行一下这个sql语句

再去生成,搞定了。


如你的表前缀改成其它的,如 jzd_, 就会出现这类错误:
Code:
Table 'jzd_ecms_news_data_' doesn't exist
select keyid,dokey,newstempid,closepl,infotags,writer,befrom,newstext from ***_ecms_news_data_ where id='1' limit 1
可这么写:
Code:
delete from `jzd_ecms_news_index` where id not in(select id from jzd_ecms_news)
也可运行
Code:
delete from jzd_ecms_news where id not in (select id from jzd_ecms_news_data_1)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 5 (0 members and 5 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Prescription-glasses.com offers prescription glasses online at discount prices.
All times are GMT +8. The time now is 07:16 AM.


Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.