Page 1 of 1

Statistics Question

Posted: Thu Jun 15, 2006 2:53 pm
by baggypants303
Hey guys,

I have to build a website that needs to store statistics for Page Views, and they need to be saved and show for:

1 Today
2 Last week (starts on Sunday)
3 Last 30 days
4 Month archives
5 All time

I'll probably also have a button to reset it after end of year. Any ideas on how to do this would help me...Thanks.

Posted: Thu Jun 15, 2006 3:03 pm
by feyd
Looks like a single table would work just fine, with a little bit of clever (quite simple, actually) queries, you can perform each of those.

Posted: Thu Jun 15, 2006 5:48 pm
by baggypants303
I think I'm going to use tables yes.

However, I'm wondering how to manage the time to shift pages views (or clicks) into days, weeks, and months...

Like I can store single statistics (i.e. Total Page Views), but how to do Page Views only Today, page views by month, etc.? Just an idea about how to program something like that would be helpful.

Posted: Thu Jun 15, 2006 6:00 pm
by feyd
You wouldn't store the statistics, per se, but the individual page view recordings that would be used to create the statistics.