Make WordPress Core

Changeset 24494


Ignore:
Timestamp:
06/21/2013 06:22:26 PM (11 years ago)
Author:
nacin
Message:

Partially revert [24459] and only flush insert_id on the next insert or replace query, as we had been doing before. (Yes, this is not how mysql_insert_id() works.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/wp-db.php

    r24459 r24494  
    11181118        $this->col_info    = null;
    11191119        $this->last_query  = null;
    1120         $this->rows_affected = $this->num_rows = $this->insert_id = 0;
     1120        $this->rows_affected = $this->num_rows = 0;
    11211121        $this->last_error  = '';
    11221122
     
    13001300        if ( ! in_array( strtoupper( $type ), array( 'REPLACE', 'INSERT' ) ) )
    13011301            return false;
     1302        $this->insert_id = 0;
    13021303        $formats = $format = (array) $format;
    13031304        $fields = array_keys( $data );
Note: See TracChangeset for help on using the changeset viewer.