Thanks, that method worked, however I have a slight problem trying to output the stats correctly. I am using this function mysql_query_inccounter instead of mysql_query(). I then echo $querycount which contains the number of queries I made.
<?php
$querycount = "0";
function mysql_query_inccounter($query) {
global $querycount;
$querycount++;
return mysql_query($query);
}
?>
I soon found out that anything below the number 1 will echo a blank instead of the number zero, so I tried to receive and fetch the data, but I'm not sure why this isn't working. It automatically echoes "0 MySQL queries executed" even if there are queries being made.
<?php
if (!($_GET['querycount'])) {
echo "0 MySQL queries executed.";
} else {
echo "$querycount MySQL queries executed.";
}
?>
I’ve tried a few different methods
if ($_GET['querycount'] == "") {
if (!($_GET['querycount'])) {
if ($_GET['querycount'] == "0") {