I have a calendar table in my MYSQL database with one field named datefield (type DATE).
Previously I inserted dates from 2008-01-01 to 2010-01-01 but now I want to add every day until the current date. Unfortunately, I’m completely forgotten how I did this.
I’m also wondering if there is any way to automate the process of keeping this table current.
I’m using PHP so I guess I could do a new INSERT every day? Or is there some way to do this directly in MYSQL?
thanks,
tim
Here’s a quick hack:
For the daily insert you can try a cron job or MySQL offers “EVENTS”, something like:
Read more about it here:
MySQL Create Event manual entry
_