This is what I did.

$StartTime = date("U");
$result = mysql_query($query);
$EndTime = date("U");

$difference = $EndTime - $StartTime;
echo "<p>The query took $difference seconds to generate</p>\n";

Perhaps not the most accurate but who cares about a few milliseconds.

Robbert van Andel 

-----Original Message-----
From: Tularis [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 21, 2002 8:28 AM
Subject: [PHP] show mysql- processing time

I was wondering if anyone knew of a way to return the processing time of 
a mysql query via php.

And NOT using the

$starttime = time();
$endtime = time();
$processingtime = $endtime - $starttime;

Does anyone???? please?

PHP General Mailing List (
To unsubscribe, visit:

 "The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from all

Reply via email to