I have a MySQL database that I want to run a query with a WHERE condition that looks for records matching an exact date between a date range.
For example, my user chooses a beginning to date and an ending date then I want to a loop to loop through each actual date between those.
Then it will run a query using each date.
My problem is that I cannot get the loop to find each date between the range. I can easily increase the date mathematically (but that has tons of problems), or find the number of days between the range,
How can I loop through a range returning each valid date?