Update post_date_gmt with values from post_date
-
Hi, Would someone be able to help me form a query to replace the (blank) value in post_date_gmt with the value stored in post_date? I have trouble combining sql statements. I’m working in phpmyadmin’s sql window. I need to do the following.
1) Select all posts that have a 0 value in the post_date_gmt field of wp_posts.
SELECT ID, post_date FROM wp_posts WHERE post_date_gmt = 0
2) Update the post_date_gmt with the value from post_date where the post id for post_date is equal to the post id for post_date_gmt.
I am having trouble with the second query.
Thanks!
EDIT: If I could add +3 hours to the post_date_gmt, that would be great… but its not essential.
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Update post_date_gmt with values from post_date’ is closed to new replies.