PHP/MySQL Question

SpaceshipSpaceship
SpaceshipSpaceship
SpaceshipSpaceship
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
Close
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
Close
id like it to be grouped by day, month, year so it can be used better for a graph
 
0
Close
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
Close
You Could Setup A Page That Echos All That Information Everyday So That You Dont Have To Do Nothing.
 
0
Close
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Filters for activity feeds
Your news feed, Latest activity, and the activity tab on profiles now have filter buttons: All, Posts, Quick replies, and Other. Your...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back