Ok this one has me stumped and not sure if it is even possible. I have a database with a start and end date. for example start date 2002 and end date 2012, however what i want to do is list all of the dates between these two points so for example, 2003, 2004, 2005, etc.
However these dates are not in the database, and so what i want to do is automatically create them. Is this possible?, my other idea is to create a second database with a join and a list all the of dates.
Just after some advice really on what would be the best way to approach this.
Thanks
Such things should be done with PHP.
Use a couple of the many datefunctions PHP has to offer.
You can create a timestamp with
mktime()and then usestrtotime()for example to loop.Haven’t tested it, but should work.
strtotime()
mktime()
List of all date functions in PHP