OK, looking can't see the prob...
PHP Code:
function query($query_string) {
global $query_count,$showqueries,$explain,$querytime,$pagestarttime;
// do query
$pageendtime=microtime();
$starttime=explode(" ",$pagestarttime);
$endtime=explode(" ",$pageendtime);
$beforetime=$endtime[0]-$starttime[0]+$endtime[1]-$starttime[1];
$this->query_id = mysql_query($query_string,$this->link_id);
if (!$this->query_id) {
$this->halt("Invalid SQL: ".$query_string);
}
$query_count++;
$pageendtime=microtime();
$starttime=explode(" ",$pagestarttime);
$endtime=explode(" ",$pageendtime);
$aftertime=$endtime[0]-$starttime[0]+$endtime[1]-$starttime[1];
$querytime+=$aftertime-$beforetime;
if ($showqueries) {
echo "Query: $query_string\n";
echo "Time before: $beforetime\n";
echo "Time after: $aftertime\n"
???
What's the prob?