I’m helping someone put together a website that helps schedule fitness instructors, and I’m trying to figure out how to store hours of availability in the database. Right now we have a table that holds the instructors, but I’m not really sure how to store their availability in a way that will be easily searchable using a web form.
Would I show instructor ID, date, start time, end time? Or is there a better way?
Most of the shifts will be during normal business hours. Eventually we might have to accommodate timezones, but just in North America. If we do weekdays (Mon, Tues, Wed) then I’m wondering how to handle booking time weeks in advance. Maybe have a week number (1-52)?
[quote=“cydewaze, post:3, topic:107201, full:true”]…then I’m wondering how to handle booking time weeks in advance. Maybe have a week number (1-52)?
[/quote]
that’s a different question, you asked about availability schedules, not bookings
Sorry, I misunderstood the purpose of what they wanted (I over-thought it as I often do). This table is indeed to show general hours of availability (ex 9-5 on Monday, 10-5 on Tuesday, etc)
[quote=“cydewaze, post:6, topic:107201, full:true”]I’m trying to think of a way that makes them searchable, as opposed to a text value like “9-5” which would only be good for display.
[/quote]
this design ~is~ searchable…
WHERE starttime BETWEEN '11:00' AND '13:30'
AND endtime >= '16:00'