I'm trying to setup a table for store hours, to show when the store is open, but I'm having major problems with the current way I am doing it. I'm hoping to find a better way in structure my table for easy searchability. Right now I have it like this:
hourID(int)
listingID(int)
hourDay(int 1 to 7)
hour1(time)
hour2(time)
This works just fine if you are only searching within that specific day.... however, say the store is open until 2AM, then the whole system breaks because it cannot compare hour1 to hour2 if hour2 is less than hour1