"Shaun Bramley" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello all,
>
> I am using mySQL and PHP, how can I use PHP to display the length of time
> used by a query?
Shaun,
<?
// grab the start time
$start = time();
// db query goes here
$res = mysql_query(...);
// grab the end time
$end = time();
// work out the time taken in ms from the two timestamps
$timetaken = $start - $end;
?>
HTH.
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php