Ticket #6764: savequeries_check.diff
File savequeries_check.diff, 872 bytes (added by , 16 years ago) |
---|
-
wp-includes/wp-db.php
11 11 define('ARRAY_A', 'ARRAY_A', false); 12 12 define('ARRAY_N', 'ARRAY_N', false); 13 13 14 if (!defined('SAVEQUERIES'))15 define('SAVEQUERIES', false);16 17 14 class wpdb { 18 15 19 16 var $show_errors = false; … … 279 276 $this->last_query = $query; 280 277 281 278 // Perform the query via std mysql_query function.. 282 if ( SAVEQUERIES)279 if ( defined('SAVEQUERIES') && SAVEQUERIES ) 283 280 $this->timer_start(); 284 281 285 282 $this->result = @mysql_query($query, $this->dbh); 286 283 ++$this->num_queries; 287 284 288 if ( SAVEQUERIES)285 if ( defined('SAVEQUERIES') && SAVEQUERIES ) 289 286 $this->queries[] = array( $query, $this->timer_stop(), $this->get_caller() ); 290 287 291 288 // If there is an error then take note of it..