X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=blobdiff_plain;f=include%2Fdb.php;h=b84a56670c329c3dfb6ef1c16bcaab19f02ada7c;hp=28100a7b8d80b7fbec0493548db5c5738437e1c8;hb=d68b2fa2ea0ef193ca1d9d906a8e8071dd191e77;hpb=5edd63b115fe7712c6e220fc6a0b78dbace4f3cd diff --git a/include/db.php b/include/db.php index 28100a7..b84a566 100644 --- a/include/db.php +++ b/include/db.php @@ -61,8 +61,18 @@ function DB_query($query) /* debug/optimize the database $logfile=fopen('/tmp/DBlog.log','a+'); fwrite($logfile,"EXPLAIN $query ;\n"); + + $time = microtime(); + $return = mysql_query($query); + $time = $time - microtime(); + + fwrite($logfile,"time of above query: $time\n"); + fclose($logfile); + + return $return; */ + return mysql_query($query); }