Storing calendar data in MySQL

Just a quick architecture question is actually storing calendar data.

Basically, I have a database of rental services. At the front end there is a calendar showing either "Available" or "Inaccessible" for each future date. In the background, the user can set any available or inaccessible date / date range (1 or 0) in the jQuery calendar.

The question I have is how are you going to store this data in mysql and retrieve it at the front end?

Is it possible to have all dates and keep inaccessible dates? Then, if they are again set as available, delete the entry for that date?

Cheers, RJ

+5
source share
2 answers

Is it possible to have all dates and keep inaccessible dates? Then, if they are again set as available, delete the entry for that date?

, , , - , , , .

, 1 , ( ).

1 . , , .

, , (, ), , โ€‹โ€‹ !


- , , , :

enter image description here

, RENTING_DAY PK .

RENTING_DAY START_DATE END_DATE RENTING, , .

+3

, Available Unavailable.

?

, ?

unavailable_start unavailable_end - . unavailable_start = _end. . jQuery, .

+1

All Articles