Basically I have a site where users can upload and share files. I would like it so users can keep track how many downloads were made in the last 30 days and be able to view each of those 30 days individually.
I was thinking of creating a table that’ll have 31 columns, 1 column being the id and the rest being day1, day2, day3,etc… Updating this table every day moving the downloads of 1 day to the day before.
My question is would this be efficient or is there a better way of going about this?
You would be better off having a download table which links to your file table. The download table would create a record each time a file is downloaded.
etc.
Then write a query to determine how many downloads happened a day would be quite an easy task.