I am desperate, I read many posts but couldn't quite find a solution...
I have a table called reservations
.
In there I have 5 fields
ID(int)
room(TEXT)
date(DATE)
from(TIME)
to(TIME)
lets say in PHP I have 4 variables:
$room = "sauna";
$date = "2015-03-03";
$open_from = "09:00:00";
$open_to = "15:00:00";
I don't know how to make this Query which tells me whether there is still time for use between the opening times or not
I read many threads but I couldn't find anything which has this exact thing.
All I need is a '0' or '1' as a return value so I can simply dynamically remove the "add reservation" button from the page if there's no time left where one could put in a reservation anyways...
Please help me :(
Sincerely Depth