php - How I store business hours in a mysql table -
i'm working on website involving local restaurants, , 1 thing need store restaurant operating hours in mysql.
data comes html php this.
// eg: monday saturday 8am 10pm $_post['from'], $_post['to'], $_post['opening_time'], $_post['closing_time']
my sql
table structure this.
create table business_hours ( id integer not null primary key, restaurant_id integer not null, day integer not null, open_time time, close_time time )
my question getting 2 days users above opening , closing time. need insert business_hours
table records between 2 days.
eg: monday
, friday
(if opening , closing period of week)
then need store these operating hours in table
monday,9am,11pm tuesday,9am,11pm wednesday,9am,11pm thursday,9am,11pm friday,9am,11pm
can tell me how can this?
any idea appreciated.
thank you.
Comments
Post a Comment