I have a database table storing users on my site. I want to be able to filter the users in 5 different ways (amt of favs, amt of views, amt of plays, amt of reviews, highest rating).
I have a table storing all favs on the site and all the reviews on the site; and I have fields for all users storing amt of views, amt of plays, and rating. I do not have trouble filtering by views, plays, and rating. I was unsure how to filter by favs and reviews, so I added those fields to the users table and they are updated accordingly.
Now I do not have trouble filtering any of those parameters. But I would like to take the filters further, and filter the same data, but only account for numbers accumulated over the past day, the past week, and the past month, in addition to all time. ie: filtering all time may display that a user has 102 views, but filtering by today would give them only 3.
I am unsure if this is possible. My one idea involves making a table for every parameter and storing each statistic with a timestamp. If I had to do that I would have multiple tables with over 1,000,000 entries. This would mean storing every view, every play, etc. If this is the only way to execute my goal, I would still need assistance. How could I filter the users based on the amount of entries they have in another table? I am a little new to MySQL so I am unfamiliar with how this is done.
Is there any easier way to do this? Here is the page:
http://www.sdsportsfanatic.com/temp/iamcrack/browse_artists.php
As you can see, I am new to the forum. I don't really like to register on a new forum and ask for help before contributing anything; but I've really hit the wall on this one and I couldn't find any solutions by searching online. I appreciate your help.