NameSilo

PHP/MySQL Question

Spaceship Spaceship
Watch

elecktricity

Established Member
Impact
0
Okay I have a database setup along the lines of:
|month|day|year|ip|

Is there a way I can find out how many unique hits I got that day? Besides grouping by ip? I would like to do this for more than one day per query so it would help much thanks in advance
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
SELECT DISTINCT ip FROM tablename WHERE day = $day

I don't know how you have day set up, but if it's a string or something just add quotes around it. I'm guessing you have today's date in the columns except for ip?
 
0
•••
id like it to be grouped by day, month, year so it can be used better for a graph
 
0
•••
SELECT DISTINCT ip FROM tablename WHERE day = $day && year = $year && month = $month

(I hope I'm right on how I'm using DISTINCT.. I've never used it before. :x)
Again, add quotes if you need to.
 
0
•••
You Could Setup A Page That Echos All That Information Everyday So That You Dont Have To Do Nothing.
 
0
•••
Dynadot — .com Registration $8.99Dynadot — .com Registration $8.99

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Payment Flexibility
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back