Posted by Kimmo Laine on 12/16/58 11:57
"Jψrn Dahl-Stamnes" <newsmanDELETE@REMOVEdahl-stamnes.net> wrote in message
news:44fc09b5@news.broadpark.no...
> Hello,
>
> When doing queries from MySQL using the mysql client program, I get the
> time
> used to get the records at the end of the output.
>
> What is the best way of measuring the time used when doing a query from
> PHP?
$started = microtime();
query();
$stopped = microtime();
$elapsed = $started - $stopped;
echo "query took $elapsed ms";
--
"Ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" - lpk
http://outolempi.net/ahdistus/ - Satunnaisesti pδivittyvδ nettisarjis
spam@outolempi.net || Gedoon-S @ IRCnet || rot13(xvzzb@bhgbyrzcv.arg)
Navigation:
[Reply to this message]
|