> 技术笔记 > 帝国cms7.2把所有内容全部设置为未审核状态

帝国cms7.2把所有内容全部设置为未审核状态

自己亲测好用的!  感谢群友 go9go的帮助

多数据表用以下的sql语句

INSERT INTO phome_ecms_news_check SELECT * FROM phome_ecms_news;
delete from phome_ecms_news;
INSERT INTO phome_ecms_news_check_data SELECT * FROM phome_ecms_news_data_1;
INSERT INTO phome_ecms_news_check_data SELECT * FROM phome_ecms_news_data_2;
INSERT INTO phome_ecms_news_check_data SELECT * FROM phome_ecms_news_data_3;
delete from phome_ecms_news_data_1;
delete from phome_ecms_news_data_2;
delete from phome_ecms_news_data_3;
update `phome_ecms_news_index` set `checked`=0;

单表数据的用以下的sql语句

INSERT INTO phome_ecms_news_check SELECT * FROM phome_ecms_news;
delete from phome_ecms_news;
INSERT INTO phome_ecms_news_check_data SELECT * FROM phome_ecms_news_data_1;
delete from phome_ecms_news_data_1;
update `phome_ecms_news_index` set `checked`=0;

处理 重复的保留一个有用  清除另外出错没有用

delete from phome_ecms_news_check where not exists (select * from phome_ecms_news_check_data where phome_ecms_news_check.id = phome_ecms_news_check_data.id);
delete from phome_ecms_news_check_data where not exists (select * from phome_ecms_news_check where phome_ecms_news_check_data.id = phome_ecms_news_check.id);
delete from phome_ecms_news where exists (select * from phome_ecms_news_check where phome_ecms_news_check.id = phome_ecms_news.id);
支付宝赞助
微信赞助

帝国cms7.2把所有内容全部设置为未审核状态:等您坐沙发呢!

发表评论

您必须 [ 登录 ] 才能发表留言!