Some selects ;)

wxdqz

New Member
Hi, I have some problems with mySQL

I currently have tree tables:

TABLE site:
site_id
site_name
etc.

TABLE hits_in:
site_id
user_ip
datetime

TABLE hits_out:
site_id
user_ip
datetime

My script currently counts number of visits in to my site (from other sites) and stores the data (time, ip, site_id) in hits_in table. Same way my script count users leaving my site to others (time, ip, site_id in hits_out).

Ok ;)

What I want to do is to show a table with site_id, site_name and count numbers of hits out and in. However I only want to count numbers of uniqe ips for each site based on a 24 houre limit (thats, only count same ip once a day even if one user have visited the same site more than one)

Ok ,.. hope somebody understands my problem and can help me ;)

thanks in advance ;)
-johnsen
 
Back
Top