diff --git src/wp-includes/wp-db.php src/wp-includes/wp-db.php
index 1eb3970..439c30c 100644
|
|
class wpdb { |
1366 | 1366 | } |
1367 | 1367 | |
1368 | 1368 | // If there is an error then take note of it.. |
1369 | | if ( $this->last_error = mysql_error( $this->dbh ) ) { |
| 1369 | if ( $this->last_error ) { |
1370 | 1370 | // Clear insert_id on a subsequent failed insert. |
1371 | 1371 | if ( $this->insert_id && preg_match( '/^\s*(insert|replace)\s/i', $query ) ) |
1372 | 1372 | $this->insert_id = 0; |
… |
… |
class wpdb { |
1419 | 1419 | $this->result = @mysql_query( $query, $this->dbh ); |
1420 | 1420 | $this->num_queries++; |
1421 | 1421 | |
| 1422 | $this->last_error = mysql_error( $this->dbh ); |
| 1423 | |
1422 | 1424 | if ( defined( 'SAVEQUERIES' ) && SAVEQUERIES ) { |
1423 | | $this->queries[] = array( $query, $this->timer_stop(), $this->get_caller() ); |
| 1425 | $this->queries[] = array( $query, $this->timer_stop(), |
| 1426 | $this->get_caller(), $this->last_error ); |
1424 | 1427 | } |
1425 | 1428 | } |
1426 | 1429 | |