SQL function to copy a custom field to the post_content en mass in for wordpress

custom-fields mysql sqlbulkcopy wordpress

Question

I must transfer the information from the key value for the key post content to the key values for post content in another database named wp posts.

Is it possible to do this in mass, such as for all articles in the database? I really appreciate your assistance with this.

1
0
9/25/2014 8:11:28 PM

Popular Answer

assuming that wp postmeta contains your first post's content (a custom field). You would then transfer the information from the wp postmeta to the wp posts;

UPDATE wp_posts,wp_postmeta 
SET wp_posts.post_content = wp_postmeta.meta_value 
WHERE wp_posts.ID = wp_postmeta.post_id 
AND wp_postmeta.meta_key='abstract'
0
8/7/2015 7:40:32 AM


Related Questions





Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow