Hit Counter
I'm creating a hit counter, using PHP on an HTML page. I have it set up so that a new entry is created for every visitor, storing their IP, computer environment, ect. I now need a way to show how many hits I have. Would something like
$query="SELECT id FROM counter WHERE id > 0";
$hits = mysql_query($query);
echo "There are ".mysql_num_rows($hits)"";
be an ok solution or would that get bogged down after a while? The table is set up to assign an auto_increment number for each new line. I would like to be able to pull that number off of the last line entered but I don't know the code for that. Thanks.
Subject
Written By
Posted
Hit Counter
August 18, 2005 08:50AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.