fantic Posted October 16, 2008 Share Posted October 16, 2008 i want to make an application on hotel booking system on php and mySQL. for exam example when a client books a room from October 27 to November 10. then how to make that room has already booked during this period? thanks Link to comment https://forums.phpfreaks.com/topic/128681-identify-date/ Share on other sites More sharing options...
Andy17 Posted October 16, 2008 Share Posted October 16, 2008 You could just add a column in your table that's called "booked" and by default, all values are 0 for all rooms. Then when someone wants to book a room, you find that row in your table and checks if the booked row is 0 (if not, it's already booked). If it is, you can allow the person to book it and then change the booked value to 1. Something like that? Edit: You'd of course need a way to set the booking date and expiration as well, but I never tried anything like that so I will make room for a pro. Link to comment https://forums.phpfreaks.com/topic/128681-identify-date/#findComment-666912 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.