I need some assistance with some SQL
I have a table that contains appointments
AppName AppDate AppTime
After an appointment has been booked, a ' Rebook' button is available for people to rebook that appointment if the time and date changes..
This all works but what I want to do now is this.
When people try to rebook I DON"T want them to be able to choose a date that is AFTER the next appointment.
Appointment 1 01/05/2015
Appointment 2 15/05/2015
If people choose to rebook appointment 1 then I want it to stop people choosing a date beyond Appointment 2. So the only available dates to rebook would be between 01/05/2015 and 15/05/2015.