]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/wp-db.php
Wordpress 3.5.2
[autoinstalls/wordpress.git] / wp-includes / wp-db.php
index b3aa8f6d20fd7cd52bdeff95ce7f4dedb0cac3b2..4fc829fb6c56510ec81c82f32726018e12473d42 100644 (file)
@@ -1120,6 +1120,8 @@ class wpdb {
                $this->last_result = array();
                $this->col_info    = null;
                $this->last_query  = null;
                $this->last_result = array();
                $this->col_info    = null;
                $this->last_query  = null;
+               $this->rows_affected = $this->num_rows = 0;
+               $this->last_error  = '';
 
                if ( is_resource( $this->result ) )
                        mysql_free_result( $this->result );
 
                if ( is_resource( $this->result ) )
                        mysql_free_result( $this->result );
@@ -1300,6 +1302,7 @@ class wpdb {
        function _insert_replace_helper( $table, $data, $format = null, $type = 'INSERT' ) {
                if ( ! in_array( strtoupper( $type ), array( 'REPLACE', 'INSERT' ) ) )
                        return false;
        function _insert_replace_helper( $table, $data, $format = null, $type = 'INSERT' ) {
                if ( ! in_array( strtoupper( $type ), array( 'REPLACE', 'INSERT' ) ) )
                        return false;
+               $this->insert_id = 0;
                $formats = $format = (array) $format;
                $fields = array_keys( $data );
                $formatted_fields = array();
                $formats = $format = (array) $format;
                $fields = array_keys( $data );
                $formatted_fields = array();