Index: wp-admin/import/wordpress.php
===================================================================
--- wp-admin/import/wordpress.php	(revision 12543)
+++ wp-admin/import/wordpress.php	(working copy)
@@ -747,7 +747,7 @@
 			$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) );
 			}
 		}
 	}
Index: wp-admin/import/wp-cat2tag.php
===================================================================
--- wp-admin/import/wp-cat2tag.php	(revision 12543)
+++ wp-admin/import/wp-cat2tag.php	(working copy)
@@ -272,7 +272,7 @@
 					if ( $values ) {
 						$wpdb->query("INSERT INTO $wpdb->term_relationships (object_id, term_taxonomy_id, term_order) VALUES " . join(',', $values) . " ON DUPLICATE KEY UPDATE term_order = VALUES(term_order)");
 
-						$wpdb->query( $wpdb->prepare("UPDATE $wpdb->term_taxonomy SET count = %d WHERE term_id = %d AND taxonomy = 'post_tag'", $category->count, $category->term_id) );
+						$wpdb->update($wpdb->term_taxonomy, array('count' => $category->count), array('term_id' => $category->term_id, 'taxonomy' => 'post_tag') );
 					}
 
 					echo __('Converted successfully.') . "</li>\n";
@@ -292,7 +292,7 @@
 						$wpdb->query("INSERT INTO $wpdb->term_relationships (object_id, term_taxonomy_id, term_order) VALUES " . join(',', $values) . " ON DUPLICATE KEY UPDATE term_order = VALUES(term_order)");
 
 						$count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(*) FROM $wpdb->term_relationships WHERE term_taxonomy_id = %d", $tag_ttid) );
-						$wpdb->query( $wpdb->prepare("UPDATE $wpdb->term_taxonomy SET count = %d WHERE term_id = %d AND taxonomy = 'post_tag'", $count, $category->term_id) );
+						$wpdb->update($wpdb->term_taxonomy, array('count' => $count), array('term_id' => $category->term_id, 'taxonomy' => 'post_tag') );
 					}
 					echo __('Tag added to all posts in this category.') . " *</li>\n";
 
@@ -311,10 +311,10 @@
 				}
 
 				// Change the category to a tag.
-				$wpdb->query( $wpdb->prepare("UPDATE $wpdb->term_taxonomy SET taxonomy = 'post_tag' WHERE term_id = %d AND taxonomy = 'category'", $category->term_id) );
+				$wpdb->update($wpdb->term_taxonomy, array('taxonomy' => 'post_tag'), array('term_id' => $category->term_id, 'taxonomy' => 'category') );
 
 				// Set all parents to 0 (root-level) if their parent was the converted tag
-				$parents = $wpdb->query( $wpdb->prepare("UPDATE $wpdb->term_taxonomy SET parent = 0 WHERE parent = %d AND taxonomy = 'category'", $category->term_id) );
+				$wpdb->update($wpdb->term_taxonomy, array('parent' => 0), array('parent' => $category->term_id, 'taxonomy' => 'category') );
 
 				if ( $parents ) $clear_parents = true;
 				$clean_cat_cache[] = $category->term_id;
@@ -379,7 +379,7 @@
 
 						if ( $default_cat != $tag->term_id ) {
 							$count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(*) FROM $wpdb->term_relationships WHERE term_taxonomy_id = %d", $tag->term_id) );
-							$wpdb->query( $wpdb->prepare("UPDATE $wpdb->term_taxonomy SET count = %d WHERE term_id = %d AND taxonomy = 'category'", $count, $tag->term_id) );
+							$wpdb->update($wpdb->term_taxonomy, array('count' => $count), array('term_id' => $tag->term_id, 'taxonomy' => 'category') );
 						}
 					}
 
@@ -394,12 +394,13 @@
 				// Change the tag to a category.
 				$parent = $wpdb->get_var( $wpdb->prepare("SELECT parent FROM $wpdb->term_taxonomy WHERE term_id = %d AND taxonomy = 'post_tag'", $tag->term_id) );
 				if ( 0 == $parent || (0 < (int) $parent && $this->_category_exists($parent)) ) {
-					$reset_parent = '';
+					$new_fields = array('taxonomy' => 'category');
 					$clear_parents = true;
-				} else
-					$reset_parent = ", parent = '0'";
+				} else {
+					$new_fields = array('taxonomy' => 'category', 'parent' => 0);
+				}
 
-				$wpdb->query( $wpdb->prepare("UPDATE $wpdb->term_taxonomy SET taxonomy = 'category' $reset_parent WHERE term_id = %d AND taxonomy = 'post_tag'", $tag->term_id) );
+				$wpdb->update($wpdb->term_taxonomy, $new_fields, array('term_id' => $tag->term_id, 'taxonomy' => 'post_tag') );
 
 				$clean_term_cache[] = $tag->term_id;
 				$clean_cat_cache[] = $cat['term_id'];
Index: wp-admin/includes/bookmark.php
===================================================================
--- wp-admin/includes/bookmark.php	(revision 12543)
+++ wp-admin/includes/bookmark.php	(working copy)
@@ -186,19 +186,14 @@
 	}
 
 	if ( $update ) {
-		if ( false === $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->links SET link_url = %s,
-			link_name = %s, link_image = %s, link_target = %s,
-			link_visible = %s, link_description = %s, link_rating = %s,
-			link_rel = %s, link_notes = %s, link_rss = %s
-			WHERE link_id = %s", $link_url, $link_name, $link_image, $link_target, $link_visible, $link_description, $link_rating, $link_rel, $link_notes, $link_rss, $link_id ) ) ) {
+		if ( ! $wpdb->update( $wpdb->links, compact('link_url', 'link_name', 'link_image', 'link_target', 'link_description', 'link_visible', 'link_rating', 'link_rel', 'link_notes', 'link_rss'), compact('link_id') ) ) {
 			if ( $wp_error )
 				return new WP_Error( 'db_update_error', __( 'Could not update link in the database' ), $wpdb->last_error );
 			else
 				return 0;
 		}
 	} else {
-		if ( false === $wpdb->query( $wpdb->prepare( "INSERT INTO $wpdb->links (link_url, link_name, link_image, link_target, link_description, link_visible, link_owner, link_rating, link_rel, link_notes, link_rss) VALUES(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
-		$link_url,$link_name, $link_image, $link_target, $link_description, $link_visible, $link_owner, $link_rating, $link_rel, $link_notes, $link_rss ) ) ) {
+		if ( ! $wpdb->insert( $wpdb->links, compact('link_url', 'link_name', 'link_image', 'link_target', 'link_description', 'link_visible', 'link_owner', 'link_rating', 'link_rel', 'link_notes', 'link_rss') ) ) {
 			if ( $wp_error )
 				return new WP_Error( 'db_insert_error', __( 'Could not insert link into the database' ), $wpdb->last_error );
 			else
Index: wp-admin/includes/template.php
===================================================================
--- wp-admin/includes/template.php	(revision 12543)
+++ wp-admin/includes/template.php	(working copy)
@@ -1776,7 +1776,7 @@
 			// catch and repair bad pages
 			if ( $page->post_parent == $page->ID ) {
 				$page->post_parent = 0;
-				$wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET post_parent = '0' WHERE ID = %d", $page->ID) );
+				$wpdb->update($wpdb->posts, array('post_parent' => 0), array('ID' => $page->ID), array('post_parent' => '%d'), array('ID' => '%d'));
 				clean_page_cache( $page->ID );
 			}
 
Index: wp-admin/includes/user.php
===================================================================
--- wp-admin/includes/user.php	(revision 12543)
+++ wp-admin/includes/user.php	(working copy)
@@ -435,8 +435,8 @@
 
 	} else {
 		$reassign = (int) $reassign;
-		$wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET post_author = %d WHERE post_author = %d", $reassign, $id) );
-		$wpdb->query( $wpdb->prepare("UPDATE $wpdb->links SET link_owner = %d WHERE link_owner = %d", $reassign, $id) );
+		$wpdb->update( $wpdb->posts, array('post_author' => $reassign), array('post_author' => $id) );
+		$wpdb->update( $wpdb->links, array('link_owner' => $reassign), array('link_owner' => $id) );
 	}
 
 	// FINALLY, delete user
Index: wp-includes/post.php
===================================================================
--- wp-includes/post.php	(revision 12543)
+++ wp-includes/post.php	(working copy)
@@ -3738,7 +3738,7 @@
 	// all revisions and (possibly) one autosave
 	$revisions = wp_get_post_revisions( $post_id, array( 'order' => 'ASC' ) );
 
-	// WP_POST_REVISIONS = (int) (# of autasaves to save)
+	// WP_POST_REVISIONS = (int) (# of autosaves to save)
 	$delete = count($revisions) - WP_POST_REVISIONS;
 
 	if ( $delete < 1 )
