Jump to content

SP for checking availability


p_richardson

Recommended Posts

I would like to make an web application for registering onto a course. When i have decided which course I want to sign up/pay for, I need to display 'check availability' of the course dates.When a user clicks 'check availability':-the server checks the dates for the course.-but only displays the dates that are available (and not the ones that are full)-If a date or dates are full- the server checks the waiting list - but only displays the waiting list option if there is room on the list- If no room on course and no room on waiting list- the server does not display any options for that date (s).- If no dates are available for the course at all, a message to appear to say 'sorry all the dates that currently full and waiting list is also full. Please call us on.... or fill out the form requesting for us to get in contact if a position appears in the course.I have made up tables and I was wondering if anyone could help me with the stored procedures to get the check availability to work (like easyjet checking for available flights, etc.)This is what i got so far- a SP for one of the courses - BSO. I have asked it to find dates (column) in Table Dates for BSO. Is this correct so far?? I want it to display the dates, but if a date is full for it to look at the waiting list table for BSO and to do a check on the number of students on the course (from student column)- how do i do that - what code should i insert into this SP? CREATE PROCEDURE dbo.AvailabilityASSELECT DatesFROM [Dates for BSO]RETURN

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...