I am trying to make a views system for my website.
I got a 770 rows of articles in my MySQL database and I’m trying to do a views system to know which article got the most views and when. (Today, 3 Days Ago, This week, This month).
I tried to do something like this in MySQL database:
Table: views
ID articleID date
But then I don’t know how to sum it up? and If I will add column ‘views’ it won’t help me because I have to change the dates all time.
All articles:
2012 only:
For a specific article for each month: