I have the following code what I am aiming to achieve is for the user when they enter a date and time that is booked the error message occurs but I then want the next avialble time to be displayed to the user for that date. I have another two tables in a database on is tblBooking which holds the fields BookingDate and BookingTime and the other table tblStartTimes which holds all of the times such as 08:00, 08:15 etc at 15 mins intervals to 20:00. What I expect to happen is that when the error is displayed below then the user will be presented with the next neares time from the tblStartTimes and also the BookingDate and this new selected time will have to be checked in the tblBookings again to make sure it is also not booked this will have to be done befor presenting to the user the next possible time?
Any ideas on how I can carry this out appreciated?
<CFOUTPUT QUERY="booking">
<CFSET bookdate = DateFormat(bookdate,"mm/dd/yy"
>
<CFSET booktime = TimeFormat(booktime,"HH:mm"
>
<cfif #bookdate# EQ #BookingDate# AND #booktime# EQ #BookingTime#>
Error
</cfif>
</CFOUTPUT>
Any ideas on how I can carry this out appreciated?
<CFOUTPUT QUERY="booking">
<CFSET bookdate = DateFormat(bookdate,"mm/dd/yy"
<CFSET booktime = TimeFormat(booktime,"HH:mm"
<cfif #bookdate# EQ #BookingDate# AND #booktime# EQ #BookingTime#>
Error
</cfif>
</CFOUTPUT>