Changeset 3517 for trunk/wp-includes/wp-db.php
- Timestamp:
- 02/12/2006 07:53:23 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/wp-db.php
r2737 r3517 17 17 18 18 var $show_errors = true; 19 var $num_queries = 0; 19 var $num_queries = 0; 20 20 var $last_query; 21 21 var $col_info; … … 76 76 // ==================================================================== 77 77 // Format a string correctly for safe insert under all PHP conditions 78 78 79 79 function escape($string) { 80 80 return addslashes( $string ); // Disable rest for now, causing problems … … 102 102 </div>"; 103 103 } else { 104 return false; 104 return false; 105 105 } 106 106 } … … 112 112 $this->show_errors = true; 113 113 } 114 114 115 115 function hide_errors() { 116 116 $this->show_errors = false; … … 143 143 if (SAVEQUERIES) 144 144 $this->timer_start(); 145 145 146 146 $this->result = @mysql_query($query, $this->dbh); 147 147 ++$this->num_queries; … … 160 160 // Take note of the insert_id 161 161 if ( preg_match("/^\\s*(insert|replace) /i",$query) ) { 162 $this->insert_id = mysql_insert_id($this->dbh); 162 $this->insert_id = mysql_insert_id($this->dbh); 163 163 } 164 164 // Return number of rows affected … … 180 180 // Log number of rows the query returned 181 181 $this->num_rows = $num_rows; 182 182 183 183 // Return number of rows selected 184 184 $return_val = $this->num_rows; … … 294 294 return true; 295 295 } 296 296 297 297 function timer_stop($precision = 3) { 298 298 $mtime = microtime(); … … 306 306 if ( !$this->show_errors ) 307 307 return false; 308 header( 'Content-Type: text/html; charset=utf-8'); 308 header( 'Content-Type: text/html; charset=utf-8'); 309 309 echo <<<HEAD 310 310 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> … … 326 326 padding: .2em 2em; 327 327 } 328 328 329 329 h1 { 330 330 color: #006; … … 332 332 font-weight: lighter; 333 333 } 334 334 335 335 h2 { 336 336 font-size: 16px; 337 337 } 338 338 339 339 p, li, dt { 340 340 line-height: 140%; 341 341 padding-bottom: 2px; 342 342 } 343 343 344 344 ul, ol { 345 345 padding: 5px 5px 5px 20px;
Note: See TracChangeset
for help on using the changeset viewer.