Is there a query to run in php that would let you insert all dates in between two dates?
For example, entering 03/20/2012 and 03/20/2013 and populating mysql with all the dates in between the two?
I was making a ticketing system for an airline and they have 13 flights daily from 20+ locations and inserting them manually was getting tedious.
I wanted to insert the dates as well as the values for each day
EG.
FROM TO Date_From Date_To
Dar Es Salaam Zanzibar 03/20/2012 03/21/2012
Dar Es Salaam Zanzibar 03/21/2012 03/22/2012
Note
I do not want to GENERATE this list (the questions I’ve researched only answered how to generate a list) I want to POPULATE a MySQL DB
Any help would be greatly appreciated
You could use this function to generate an array of dates
and then iterato over the array to insert the data