Arieskingdom Posted October 6, 2009 Share Posted October 6, 2009 Hi there guys This isn't so much a coding question, more of a logic question. I'm working on a project for renting villa's out, there doesn't need to be online booking, just a table for each villa showing the availability, the table shows days (booked or available) but in blocks of weeks (prices per week) The admin needs to be able to update the prices per week, per villa, but the availability per DAY per villa. I assume I'd need a bookings table, a prices table (with week blocks and prices) and of course the villas table. I just need some help putting them all together...how would I make it so the admin could update the availability per day, without having all the days in a table. Thanks for any help given, and I know it's a pretty stupid question but yeah. Link to comment https://forums.phpfreaks.com/topic/176726-bookings-system/ Share on other sites More sharing options...
Mchl Posted October 6, 2009 Share Posted October 6, 2009 For each booking store starting date and end date. Then check to check if a villa is available on given date you search all its bookings and compare date ranges. Link to comment https://forums.phpfreaks.com/topic/176726-bookings-system/#findComment-931743 Share on other sites More sharing options...
Arieskingdom Posted October 6, 2009 Author Share Posted October 6, 2009 So technically, in the back-end of the system, when settings dates to booked, there isn't any need for the prices table, right? All it is in there is the week blocks and prices, it just checks the bookings table to see if any ranges clash. Wow...that simplified things. Link to comment https://forums.phpfreaks.com/topic/176726-bookings-system/#findComment-931750 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.