My database table structure is something like
stats_id stats_date stats_visitors stats_visits
1 2015-08-01 10 20
2 2015-08-03 12 21
3 2015-08-04 14 24
4 2015-08-07 15 21
What is the easiest way to add empty stats date. For example I am missing 2015-08-02 so it should be:
stats_id stats_date stats_visitors stats_visits
1 2015-08-01 10 20
5 2015-08-02 0 0
2 2015-08-03 12 21
3 2015-08-04 14 24
6 2015-08-05 0 0
7 2015-08-06 0 0
4 2015-08-07 15 21
I can check every day if it has data and populate but when I have over 10K rows its not really a good idea. If I use a check for each day I will generate over 10k queries.
Is there an easy way I can do this?