Jump to content

Archived

This topic is now archived and is closed to further replies.

techiefreak05

how to echo the query time?

Recommended Posts

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?

Share this post


Link to post
Share on other sites
top of the page:
[code=php:0]<?php
$start = microtime(true);[/code]

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

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.