E
E
Eugene2016-02-11 10:48:15
MySQL
Eugene, 2016-02-11 10:48:15

How to store the number of views for 30 days?

Good afternoon! Tell me how to implement the ability to display the number of views of each article for 30 days?
It turns out it is necessary to store record of each viewing in the separate table? After all, these are hundreds of thousands of records ... Or is there a simpler way for the database?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Armozlo, 2016-02-11
@marf7

Table article id, month-year, counter. The counter is incremented. The month changes - a record is added - another counter starts to increase, the old one is stored in the archive.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question