Hi there, I'm working with wordpress and mysql database and I try to change the post date on table wp_posts and column "post_date". Currently all my date is on "2008-07-14 09:46:42" . I want to run the sql query so it may change the date later one day than each other like record 1 = 2008-07-14 09:46:42 , record 2 = 2008-07-15 09:46:42 , record 3 = 2008-07-16 09:46:42 and so on...I've over 2000 posts right now and is impossible to change it manually. anyone can help me what query should i use to change all this? also, I want to change column "post_status" from "publish" to "future" , how can I do this in sql query? I'm using phpmyadmin in my cpanel, and it have the ability to insert query and all that. Extremely appreciate your help here, and thanks in advanced!
So your basic problem is that you want to publish the posts automatically in future? And thats why you want to tun those SQL queries? Just have a look at the right-bar of posting page where there is a small calendar. Set your publishing date in that!
i did this one, just go to your admin pannel to the post you want to change the date to and click edit and there you can change the date.
Try this: set @i=0; update wp_posts set post_date = date_add('2008-07-14 09:46:42', interval @i:=@i+1 day), post_status='future'; Sets up a variable i, and increments i for each row, adding that number of days to the original date and putting the result into the post_date field. (I don't know whether there's a better way of accessing the row number of the result set...) Please back up your database before you run this! cheers Helen