Answer the question
In order to leave comments, you need to log in
What is the best way to form the structure of the base for the calendar booking of rooms?
Good time!
Here is a simple task: there is a calendar, for any day you can assign a reservation, for 10 days, for example.
Those. from the 12th to the 22nd.
The question is, is it better to store in the database that the reservation is from the 12th for 10 days, or to create all 10 entries for 12, 13, 14 ... 22?
The result of the work: the output of the calendar and the application of armor on it.
Answer the question
In order to leave comments, you need to log in
It is better not to book from the 12th for 10 days , but to store the start date and end date. Then, without extra crutches, it will be possible to determine the time when a room is free, without creating ten entries instead of one.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question