Unsupported scripts and control panel web app for a hosting company
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

profiler.php 438B

1234567891011121314151617181920212223242526
  1. <?php
  2. require_once('lib/common.php');
  3. if (DEVELOPMENT) {
  4. $_queries = array();
  5. }
  6. function mq($sql, $file = '/home/utd/control-dev/Unknown', $line = 'Unknown') {
  7. if (DEVELOPMENT) {
  8. $start = microtime(true);
  9. }
  10. $res = mysql_query($sql) or mf($file, $line, $sql);
  11. if (DEVELOPMENT) {
  12. $end = microtime(true);
  13. global $_queries;
  14. $_queries[] = array($sql, $end - $start, $file, $line);
  15. }
  16. return $res;
  17. }
  18. ?>