> hi to all,
> how can I set up a timer that will tell me how long a query takes to run.
> for example, if I run the following query, I would like to know how long
it
> takes.
[...]
> Thanks in advanced
> Nato

I don't remember where I 've found this snippet, but it works well.

  $TIMER_START = explode(" ", microtime());
  $TIMER_START = $TIMER_START[1] + $TIMER_START[0];

## Do some stuff here:

  $TIMER_END = explode(" ", microtime());
  $TIMER_END = $TIMER_END[1] + $TIMER_END[0];
  echo "<br>", $TIMER_END - $TIMER_START, " secs";

Regards,

Philippe



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to