EDIT: I want to update one field (post_content) within a known record (id of 4) of a known table (wp_posts) in a new database (new_db). The update has to come from one field (post_content) within a known record (id of 5) of a known table (wp_posts) in the old database (old_db). Is this possible, or is something like this too atomic (?) for MySQL?
Greetingz! When manipulating WordPress's database directly, I've seen many examples here where people replace a URL like so;
mysql> UPDATE wp_db.wp_post SET post_content=REPLACE(post_content, 'http://oldsite', 'http://newsite' ) ;
However, I have a .sql dump file from my old site, that I wish to import correctly. (I cannot create an XML export file, it's too late) I have created "dummy" posts on my new blog, and have imported the old database. Now I'm trying to do something like this;
UPDATE new_db.new SET post_content = REPLACE(post_content,(SELECT post_content FROM old_db.wp_posts WHERE id = oldpost#) WHERE id = newpost#;
I realize I'll have to do this for post_date, post_title, and post_content between old_db.wp_posts and new_db.posts, I'm just hoping this is actually possible somehow....