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? Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.