Sql query counter
Simple php script to be able to count how many SQL queries your script does.
$query_counter = 0;//counter for all the executed querys function app_query($query) { global $query_counter; $query_counter++; return mysql_query( $query);//later this could be changed for another engine not only mysql }
To use it in your script instead of calling the function “mysql_query” , we will use ” app_query”.
To retrieve how many queries were done just:
echo $query_counter;
More simple impossible ;)
Related Posts- Cache Class for PHP
- SEO Functions for PHP
- Input select generated from query - PHP
- passGenerator - Random passwords for PHP
- phpMyDB - Data base class for MySql
Help sharing and Flatter me ;)

[...] day we show how to count your Sql queries on PHP. Today we do 1 step more in your app to know how long does it takes to be executed in the server [...]