I'm having an issue with figuring out my INSERT query.
What I want to do is the following:
I want to insert the availability of a user based on his giving information.
The user got a simple dashboard with:
Day ( ) Yes / ( ) No - Start time: XXXX End time: XXXX
For the day i use a radio button from monday till sunday with yes having its value="" being the name of the day and the name="" attribute named day.
No is empty which is set to default NULL,, and start end time use an input field with type="time"
My Table is setup as followed:
Table name: Availability
available_id (AI),
available_worker_id
available_day,(text)
available_start(text),
available_end(text)
Now here come's the part I cant figure out,
What if I select Monday Friday and Sunday only ? How would I create a query where the results would be as followed:
[1] [Monday] [1] [09:30] [12:50]
[2] [Friday] [1] [10:40] [17:30]
[3] [Sunday] [1] [07:00] [21:00]
Would I require to create the insert as followed:
INSERT INTO `availability` (`available _day`,` available_start`, `available _end`) VALUES (?), (?,?)
Because with this query I'll be ending up that the cols available_start, available_end getting there own values from my post and that the available_day get its own value's. Atleast that is what I understand so far with my knowledge.