Use update and insert. Props DD32. fixes #6836

git-svn-id: https://develop.svn.wordpress.org/trunk@12652 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2010-01-07 20:13:54 +00:00
parent 7e6f603296
commit 7b580bf8e8
6 changed files with 17 additions and 21 deletions

View File

@@ -747,7 +747,7 @@ class WP_Import {
$local_child_id = $this->post_ids_processed[$child_id];
$local_parent_id = $this->post_ids_processed[$parent_id];
if ($local_child_id and $local_parent_id) {
$wpdb->query( $wpdb->prepare("UPDATE {$wpdb->posts} SET post_parent = %d WHERE ID = %d", $local_parent_id, $local_child_id));
$wpdb->update($wpdb->posts, array('post_parent' => $local_parent_id), array('ID' => $local_child_id) );
}
}
}