hgkhkhk Posted November 7, 2017 Share Posted November 7, 2017 I am trying to prevent a booking (record from being inserted) based on the number of people attending a room. So in this case,a specific room cannot be booked if more than a certain number of people are attending. For example, I have a field called 'people' in the database. Attached to this is a dropdown list containing dropdown values of 1,2,3,4,5,6,7,8,9,10. (The number of people attending.) I also have a field called 'room' in the database. Attached to this is also a dropdown list containing the values 'room a', 'room b' and 'room c.' The user must select a room (either 'room a' 'room b' 'room c') and has to select the number of people attending (either 1, 2, 3, 4, 5, 6 ,7, 8, 9,10) How would I prevent 'room a' from being booked(record inserted) if more than 7 people are selected from the dropdown list? Thank you. Quote Link to comment Share on other sites More sharing options...
requinix Posted November 7, 2017 Share Posted November 7, 2017 By using a database query to get the information you need. I don't understand why you need to ask this question. Quote Link to comment Share on other sites More sharing options...
Barand Posted November 7, 2017 Share Posted November 7, 2017 I would get the number of attendees first, then give them a choice of only those rooms which have sufficient capacity Quote Link to comment Share on other sites More sharing options...
benanamen Posted November 7, 2017 Share Posted November 7, 2017 What @Barand said. Think about when you go to a restaurant. What is the first thing the Hostess says after welcoming you? "How many in your party?". Then based on that, they seat you appropriately. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.