i have a DB which allows users to allocate trainers to course
sessions, they fill out date, start time , end time and other fields
and when they click on the trainer field I have a pop up which shows
the AVAILABLE trainers, i.e. it checks the existing session times and
only shows the ones who are not allocated to other sessions for the
same day and within the start time and end time entered.
I have one problem, the query doesn't pick up any unavailable trainers
where the time entered is before an existing time.
for example,
I have an EXISTING SESSION for Liam Cullen who is teaching at 09:00
(starttime) to 14:30 (endtime),
now if i enter a new session with starttime 10:00 and endtime 14:00,
Liam should not show up as he is UNAVAILABLE however this doesn't
work.
BUT for a new session if i have starttime as 09:00 and endtime of
14:00 liam is not showing up, hence unavailable which is correct.
I have found on many occasions that if the starttime i enter is after
an existing starttime, the trainers do not show up as unavailable when
they should.
I am using the BETWEEN function and everything else works fine except
for this one issue.
Thanks in advance.
sessions, they fill out date, start time , end time and other fields
and when they click on the trainer field I have a pop up which shows
the AVAILABLE trainers, i.e. it checks the existing session times and
only shows the ones who are not allocated to other sessions for the
same day and within the start time and end time entered.
I have one problem, the query doesn't pick up any unavailable trainers
where the time entered is before an existing time.
for example,
I have an EXISTING SESSION for Liam Cullen who is teaching at 09:00
(starttime) to 14:30 (endtime),
now if i enter a new session with starttime 10:00 and endtime 14:00,
Liam should not show up as he is UNAVAILABLE however this doesn't
work.
BUT for a new session if i have starttime as 09:00 and endtime of
14:00 liam is not showing up, hence unavailable which is correct.
I have found on many occasions that if the starttime i enter is after
an existing starttime, the trainers do not show up as unavailable when
they should.
I am using the BETWEEN function and everything else works fine except
for this one issue.
Thanks in advance.