desithugg Posted June 25, 2007 Share Posted June 25, 2007 Umm I wanted my users to see how long the page took to execute and how many SQL queries it ran. I found a little code that calculates the execution time but I'm not sure how to get the number of queries executed. Anyone have any idea? Link to comment https://forums.phpfreaks.com/topic/57098-execution-timesql-queries/ Share on other sites More sharing options...
trq Posted June 25, 2007 Share Posted June 25, 2007 Anyone have any idea? Any time you call mysql_query() you'll need to increment a variable by one. There is no single solution to this problem. Link to comment https://forums.phpfreaks.com/topic/57098-execution-timesql-queries/#findComment-282141 Share on other sites More sharing options...
per1os Posted June 25, 2007 Share Posted June 25, 2007 You may try and use: www.php.net/mysql_info To do it. Or another way is to use an existing class or create your own DB class for database functions, and inside there you can set a counter for every query ran etc. But I do not think MySQL stores that information, you may try www.php.net/mysql_stat too. Link to comment https://forums.phpfreaks.com/topic/57098-execution-timesql-queries/#findComment-282147 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.