S
S
Sergey Zhukov2015-01-03 17:26:34
MySQL
Sergey Zhukov, 2015-01-03 17:26:34

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

1 answer(s)
V
Vladlen Grachev, 2015-01-03
@gwer

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 question

Ask a Question

731 491 924 answers to any question