Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

counting duplicate entries

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have a simple mysql database of visitors to a web site. Table fields are IP address and date. Is there a way I can get a report of how many times each ip address has visited my site. Of course I don't need to see those ip addresses who only show up once. Basically I want a report of the number of times a field contains duplicate data. If the IP address of 192.168.1.1 hits my web site twice I want the report to show

192.168.1.1 2

Hope this make sense Thanks in advance for any help.
 
Use a SQL Statement like this:

select ip_addr,
count(*)
from myipvisitors
group by ip_addr
having count(*) > 1;


HTH

 
GREAT!! Thanks....I really need to brush up on sql...Thanks a million!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top