I'm operating on two WordPress sites and I need to export posts only with a specific custom field from one site and import into the other. I can't do a generic dump of the database because some data would be overridden.
My SQL query:
SELECT * FROM wp_posts INNER JOIN wp_postmeta ON wp_postmeta.post_ID = wp_posts.ID WHERE ( wp_postmeta.meta_key = 'Color' AND wp_postmeta.meta_value IS NOT NULL );
Now I can export that into a .xml or .csv but I can't import that into the other site.
This is because the meta columns are appended to the row of the wp_posts. (Screenshot: http://screencast.com/t/bjogBFYyoL)
Is there a work-around?