I am building a mobile web app with jquery mobile. I want to make a reservation. So the user enters a room, a begin dateTime and an end DateTime. Then it goes to a webservice function which queryies the database.
It is gonna check if there is already a reservation between the start dateTime and the end dateTime, the user entered. If there is it is gonna put them in a list.
Now in my javascript I gonna call this function with a ajax call. Here I am going to check if there is something in this list --> the room is not available, else --> the room is available.
But there is something wrong with my query. Could you help me figure it out?
SELECT * FROM ARTICLES_RESERVERING res
INNER JOIN ARTICLES_ZAAL roo ON res.ZAALID = roo.ID WHERE roo.ID = @ZAALID
AND (res.DATUM_BEGIN >= @DATUM_EINDE OR res.DATUM_EINDE <= @DATUM_BEGIN)
Could anybody help?
Kind regards.
Steaphannn