WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/07/2010 08:13:54 PM (11 years ago)
Author:
ryan
Message:

Use update and insert. Props DD32. fixes #6836

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/import/wordpress.php

    r12515 r12652  
    748748            $local_parent_id = $this->post_ids_processed[$parent_id];
    749749            if ($local_child_id and $local_parent_id) {
    750                 $wpdb->query( $wpdb->prepare("UPDATE {$wpdb->posts} SET post_parent = %d WHERE ID = %d", $local_parent_id, $local_child_id));
     750                $wpdb->update($wpdb->posts, array('post_parent' => $local_parent_id), array('ID' => $local_child_id) );
    751751            }
    752752        }
Note: See TracChangeset for help on using the changeset viewer.