lxor I NEED YOU BRO
K so asap I need to accomplish this:
I'm currently building an airline website, working on the booking system at the moment. It runs in seasons, which are added manually. When the user adds a new season they assign a start date and an end date:
season_id (a_i)
start_date
end_date
From this a flight table needs to be populated:
flight_id (a_i)
season_id
tour_id
dept_date
no_customers (defaulting to 0)
The dept_date is what is causing me problems. Three tours are hard coded into the system as follows:
tour_id
tour_name
plane
seat_price
Departing in this fashion:
Tour 1: Each Saturday, Monday & Thursday (tour_id = 1)
Tour 2: Each Sunday, Tuesday & Friday (tour_id = 2)
Tour 3: Each Saturday (tour_id = 3)
So, basically I need to take the selected start_date(season) and the selected end_date(season) and insert a flight with tour_id = 1 into every Saturday, Monday, & Thursday with tour_id = 2 into every Sunday, Tuesday & Friday and with tour_id = 3 into every Saturday between these dates.
I have no idea how to do this.
Make it happen and I'll make you rich (metaphorically speaking).