using dates and filling in all dates inbetween

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

using dates and filling in all dates inbetween

Post by shiznatix »

ok! i have a drop down menu with the starting date of the current day and the end date 20 days ahead. I have it so you choose a start date and a end date. Then write to the db defining the start date and the end date. What i want is it to also write to the db all the dates inbetween so If someone chooses a start date that was already selected (either the start date, end date, or somthing inbetween previously defined) it will say Too Bad or somthing like that. Really my question lies in - How to define the start and end dates to be able to fill in all dates inbetween and write all the information to the db. Hope i was specific enough..
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I don't see a point in filling in the days between.. use the range checking built into the database: http://dev.mysql.com/doc/mysql/en/compa ... ators.html (between operator)
Post Reply