Changeset 659 for trunk/include/functions.inc.php
- Timestamp:
- Dec 27, 2004, 3:30:49 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions.inc.php
r618 r659 462 462 function pwg_query($query) 463 463 { 464 global $conf ;464 global $conf,$count_queries,$queries_time; 465 465 466 466 $start = get_moment(); 467 467 $result = mysql_query($query); 468 468 469 $time = get_moment() - $start; 470 $count_queries++; 471 $queries_time+= $time; 472 469 473 if ($conf['show_queries']) 470 474 { 471 global $count_queries,$queries_time;472 473 $time = get_moment() - $start;474 $count_queries++;475 476 475 $output = ''; 477 476 $output.= '<pre>['.$count_queries.'] '."\n".$query; 478 $queries_time+= $time;479 477 $output.= "\n".'(this query time : '.number_format( $time, 3, '.', ' ').' s)</b>'; 480 478 $output.= "\n".'(total SQL time : '.number_format( $queries_time, 3, '.', ' ').' s)'; 481 479 $output.= '</pre>'; 480 482 481 echo $output; 483 482 }
Note: See TracChangeset
for help on using the changeset viewer.