Database Schema For Different Prices at Different Times of the Year

Hello,

This may be more of a MySQL question but seeing as PHP will be doing the legwork I thought that I would best post it here.

I’m building a site for a villa where they will be taking online bookings, it’s mostly straightforward but I’m trying to find the best way to calculate a different price for different seasons (calculated by the day), bearing in mind that one booking could straddle two seasons.

Any ideas?

Cheers,

Jon

Normally this type of site will book on weekly slots (Sat - Sat), so youd be better off working out the price on a week number basis, then your PHP becomes a simple integer manipulation.

Hey like the name

HTH
Terry Pugh

Thanks for the reply. Unfortunately the client has given me a list of seasons and they won’t neatly fit into week slots.

My first thoughts are to have a start day/start month/end day/end month for each season and work from that, but calculating the costs might not be the most elegant process.

By the way - like the name too!

Cheers,

Jon

Did you already try the ‘search’ option in this forum? There are lots of posts about booking systems in the php and the mysql forum.

If you can’t find the answer, please let us know.