Forum Moderators: coopster
I am planning an on-line booking program and at one stage I will have to compile a list of the price per day of the prelimary booking.
The problem is that someone will select a date range that falls between two price ranges
price range from 01 - 02 = 100 euro
price range from 03 - 05 = 150 euro
I will need to then compile a list with the price per day then the total price at the bottom.
For example:
01:01:2003 - 100 Euro
02:01:2003 - 100 Euro
03:01:2003 - 150 Euro
---------------------
Total Price: 350 Euro
So my program will have to some how select the price for each individual day. Maybe by selecting each date seperatly.
Will I have to split the dates first like
01:01:2003
02:01:2003
then go through each date using
SELECT PRICE WHERE 01:01:2003 BETWEEN fromdate AND todate
I am fairly new to Php so any help or tips would be very appreciated.
Cheers
I will see if i can come up with something.
One thing though, this is before it goes into a mysql database.
Basically the person requires to book 1 apartment and has selected 4 or 5 days before they can confirm the booking I must provide an intinary of their selection so a list is required of the apartment, the dates from and to and the total price. When they click total price I have to generate the list of each day with the correct price remembering that some days will be a different price. Then the customers clicks confirm booking and it will all be inserted into a mysql database.
Will try and create some test code and see what happens.
Cheers :)