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

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

多数据表用以下的sql语句

[secret key=”0770″]

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;

[/secret]
单表数据的用以下的sql语句

[secret key=”0770″]

 
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;

[/secret]

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

[secret key=”0770″]
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);

[/secret]

未经允许不得转载:Villain博客 » 帝国cms7.2把所有内容全部设置为未审核状态

赞 (0) 打赏

评论 0

评论前必须登录!

登陆 注册

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏