1 2 3 4 5 6 7 8 9 | UPDATE `wp_posts` SET `post_date` = DATE_ADD('2014-1-01', INTERVAL ROUND(RAND() * 500 + 1) DAY) WHERE `ID` between 6297 AND 14332; update `wp_posts` set `post_modified` = `post_date` WHERE `ID` between 6297 AND 14332; update `wp_posts` set `post_date_gmt` = `post_date` WHERE `ID` between 6297 AND 14332; update `wp_posts` set `post_modified_gmt` = `post_modified` WHERE `ID` between 6297 AND 14332; update `wp_posts` set `post_status` = 'publish' WHERE `ID` between 6297 AND 14332 |
自己修改好起始时间“2014-01-01”、随机日期范围“500天”、文章ID范围起始ID 6297结束ID 14332 修改为你自己的
然后依次执行以上SQL语句即可,可以随机生成ID范围内的文章的发布日期
原文链接:https://xiaohost.com/1218.html,转载请注明出处。
评论4