Displaying MySQL execution time in PHP

<>

This question already has an answer here:

Answers


Use round to fix the decimal points

$time = microtime();
echo round($time, 2);

$ms = microtime(true);
mysql_query($sql);
$ms = microtime(true) - $ms;
echo $ms.' secs'; //seconds
echo ($ms * 1000).' millisecs'; //millseconds

Need Your Help

storing a json file from twitter's api in mongoDB

java python json twitter bson

I am using java with the twitter search api to store tweets in mongoDB, is there a way to store the json from the twitter api as is?

How to get the function name while in a function for debug strings?

c++ debugging qt

I want to output the function name each time it is called, I can easily copy and paste the function name, however I wondered if there was a shortcut that would do the job for me?