如何让时间间隔为30分钟

时间:2019-06-27 07:42:37

标签: php mysql time

我有以下两个表

table name - shop_details

id      shop_id     shop_opentime       shop_close_time
1       3           09:00               05:00

table name - booking
id      shop_id     booking_start_time  booking_close_time
1       3           10:00               11:30

现在我只想让间隔30分钟的时间段,并想知道哪个商店在哪个时间预订 我想要类似以下方法的结果

09:00-09:30 ="avaliable"
09:30-10:00 ="avaliable"
10:00-10:30 ="booked"
10:30-11:00 ="booked"
11:00-11:30 ="booked"
11:30-12:00 ="avaliable"

0 个答案:

没有答案