帝国CMS把文章移动到另外一个栏目,涉及到4张表的修改

把栏目A下的文章移动到栏目B下,以下4张表里的内容会更改:

phome_ecms_news(主表)
phome_ecms_news_data_x(这个具体要看文章在哪个副表里)
phome_ecms_news_index(索引表)
phome_enewsfile_1(信息附件分表1)

比如把栏目ID为7608的文章移动到栏目ID为7014下,SQL语句如下:

UPDATE `newfanpusoft`.`phome_ecms_news` SET `classid` = '7014' WHERE `phome_ecms_news`.`classid` = 7608;
UPDATE `newfanpusoft`.`phome_ecms_news_data_7` SET `classid` = '7014' WHERE `phome_ecms_news_data_7`.`classid` = 7608;
UPDATE `newfanpusoft`.`phome_ecms_news_index` SET `classid` = '7014' WHERE `phome_ecms_news_index`.`classid` = 7608;
UPDATE `newfanpusoft`.`phome_enewsfile_1` SET `classid` = '7014' WHERE `phome_enewsfile_1`.`classid` = 7608;

当然,文章移动了,且百度语句抓取收录了,记得做301重定向。

添加新评论