Welcome Guest, Not a member yet? Register   Sign In
Need Expert Advice
#1

[eluser]kre8ivdesigns[/eluser]
Ok so I am building a online booking site for a friend for her beach rental. I have everything done except the rate part.

My setup -> which I can change for rates

rates table {
rate_id
rate
begin_date
end_date
}

rate_dates {
date
rate_id
}

booked_dates {
date
client_id
}

so how do i check the booked dates to the rate date and place the rate in the booked date

Anyone would be great.....
#2

[eluser]WanWizard[/eluser]
You can use a BETWEEN query to that falls in a certain date range.
Determine whether begin and end date are inclusive or not, to prevent overlap between two consecutive periods.
#3

[eluser]kre8ivdesigns[/eluser]
ok i have redesigned the whole database to try to follow database norm rules. Now I will start off by populating a date table which would have a relationship between the rate table and the reservation table.

reservations table
id
checkin
checkout
confirmation

dates table
id
date

reservations_dates table
id
reservation_id
date_id

rate table
id
rate

rate_date table
id
rate_id
date_id

I think here I can have a better chance of adding a rate then relating that to dates --> then to reservations.

Feedback appreciated...




Theme © iAndrew 2016 - Forum software by © MyBB