现在我wordpress网站上面有50篇状态为草稿的文章,我想在10天内随机定时把这些文章发布出去?请问在数据库中应当执行怎样的更新语句?我在网上找了下类似的更新语句,给高手一个参考!
输入以下sql语句将推迟发布1天
UPDATE wp_posts SET post_date = DATE_ADD(post_date,INTERVAL 1 DAY);
UPDATE wp_posts SET post_date_gmt = DATE_ADD(post_date_gmt,INTERVAL 1 DAY);
UPDATE wp_posts SET post_modified = DATE_ADD(post_modified,INTERVAL 1 DAY);
UPDATE wp_posts SET post_modified_gmt = DATE_ADD(post_modified_gmt,INTERVAL 1 DAY);
UPDATE `wp_posts` SET post_status = 'future' WHERE post_status ='publish';数据库WordPressSQLphp
输入以下sql语句将推迟发布1天
UPDATE wp_posts SET post_date = DATE_ADD(post_date,INTERVAL 1 DAY);
UPDATE wp_posts SET post_date_gmt = DATE_ADD(post_date_gmt,INTERVAL 1 DAY);
UPDATE wp_posts SET post_modified = DATE_ADD(post_modified,INTERVAL 1 DAY);
UPDATE wp_posts SET post_modified_gmt = DATE_ADD(post_modified_gmt,INTERVAL 1 DAY);
UPDATE `wp_posts` SET post_status = 'future' WHERE post_status ='publish';数据库WordPressSQLphp
定时执行mysql数据库任务方案
命题: 每日 02:00 am 定时删除 表 t (id int primary key,ptime TIMESTAMP DEFAULT CURRENT_TIMESTAMP) 中三天以前的记录。 ======================================= 方法一:操作系统 ======================================= (...
update wp_posts set post_date = replace(post_date, '2013-07', '2013-08') WHERE post_status='draft';先把草稿箱中的日期提前一下
update wp_posts set post_date_gmt = post_date WHERE post_date_gmt <> post_date;同步
UPDATE wp_posts SET post_status = 'future' WHERE post_status = 'draft' 转换为定时发布
这个方法有个问题 就是 定时发布的日期拿捏不准 有可能 很多文章 都是同一天发布!