Fog Juice Posted March 12, 2008 Share Posted March 12, 2008 I've seen a few websites that have a little counter saying "12 mysql queries in .34 seconds", does anyone know the php/mysql code to show a little counter like this? Quote Link to comment https://forums.phpfreaks.com/topic/95732-is-there-a-way-to-calculate-how-many-mysql-queries-on-a-php-page/ Share on other sites More sharing options...
laffin Posted March 12, 2008 Share Posted March 12, 2008 u replace the main queries with your own; function mysqlquery($sql) { global $sqlcounter; $sqlcounter++; return mysql_query($sql); } add a timer routine to time the execution of the page Quote Link to comment https://forums.phpfreaks.com/topic/95732-is-there-a-way-to-calculate-how-many-mysql-queries-on-a-php-page/#findComment-490185 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.