Page 1 of 1

Time it took for query (MySQL & PHP)

Posted: Thu Nov 13, 2003 6:39 am
by mikebr
I want to show the user the length of time it took to get the results from a mysql query, is there a fuction that eludes me or do I need to get the time before the query is run then again after it has run and subtract them? anyone know what is the best way to do this?

Posted: Fri Nov 14, 2003 3:23 pm
by McGruff
I'd probably do this the way you have suggested: there's a getmicrotime script somewhere in the php manual which you could use.

Posted: Sat Nov 15, 2003 6:38 pm
by mikebr
Great, got one, thanks for the pointer.