Jump to content


Photo

how to echo the query time?


  • Please log in to reply
2 replies to this topic

#1 techiefreak05

techiefreak05
  • Members
  • PipPipPip
  • Advanced Member
  • 494 posts
  • LocationER, MN

Posted 31 August 2006 - 08:15 AM

i just built a rather cool.. i think.. cuz i made it, search function on my website .. and id like to display how long the query took to finish, how would i do this?
Link shortener with advanced, detailed statistics:

http://tyny.us/

#2 Jenk

Jenk
  • Members
  • PipPipPip
  • Advanced Member
  • 778 posts

Posted 31 August 2006 - 08:18 AM

top of the page:
<?php
$start = microtime(true);

bottom of the page:
$end = round(microtime(true) - $start, 3);
echo 'Query completed in ' . $end . ' seconds';


#3 techiefreak05

techiefreak05
  • Members
  • PipPipPip
  • Advanced Member
  • 494 posts
  • LocationER, MN

Posted 31 August 2006 - 08:24 AM

thanks! :-)
Link shortener with advanced, detailed statistics:

http://tyny.us/




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users