What I'm trying to achieve is is a srfer visits the site each page visited will be inserted into the database. So, if the surfer visits 5 pages there will be 5 records inserted. Initially, I need to know that this is just ONE hit (one IP), with the next surfer to vist being the second IP. That day would then show 2 hits not five hits for the first surfer plus the pages visited by the second. regards, Graham Previous post ------------------------------------------------ shown below ------------------------------------- Hi, I'm using MYSQL version 3.22.32. I have read that from version 3.23.xx COUNT can be used in combination with DISTINCT. However, I have a project deadline which does not give me time to upgrade. I have a small table 'web-stats' consisting of the following fields: IP_address web_date web_time web_referer browser page I am using a PHP script to insert entries into this table as a rudimentary hit counter. My current syntax is select web_date, dayofmonth(web_date) as d, count (IP_address) as c from web_stats group by d order by web_date but what I actually want is to count the unique IP addresses for each date. How can I work around this please? kind regards, Graham Nichols. --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php