First things first...
So, i would want to scrap those tables i mentioned in my post, and try with some simpler tables as you sggested.
I'm trying to get you thinking about how to approach the database design, if we asked all the user on this board, you would get as many answers. Thinking about the design, I thought that the simplist way was to have two tables, maybe three (if you wanted to store customer details).
This design would minimise the amount of data and time in the processing of the record returned.
How do i check the rows in the table to see if there is a booking?
Right, I had one a while ago, I was asked to create a speeddating website, with full automation in the backend. The matching script checked the person against the other sexes ticks. SO male a ticked female 1, 2 and 3, but there was only a match if female 1 also ticked male 1.
Back to the Theme park.
Search the records to show a list of the availabiliy of the selected ride, like:
select from bookings where ride = 'ridename'
we then need to further filter the search with an and, like:
select from bookings where ride = 'ridename' and time = 'selectedtime'
What happens if this time is full, how many records are there for the ride and time? We could store the details for the number of places and match this with the number of records for the time slot for this ride.
Does that make sense?
Would i need a field for each seat, or just a seat total etc....
....if so, how would i be able to return a seat number to the user?
Each booking would be allocated a number, dependent on the order of booking, so the first one would be seat 1, then 2, 3, etc.
These would be in the bookings row. The next question would be if I was to book 4 seats on a ride, do I create 1 record or 4?
would the $_SESSION['customer_ref'] be in the included ('connect.php') or somewhere on each page.
I would add that to the top of each page.
and when booking a ride this way, how would it allow mutliple rides to be booked in the same transaction?
This really calls for some kind of shopping basket. Now can you use existing code, or do you have to create the whole site yourself?
If you can include librarys, then something like wfcart could be used to store the information.
Hope this helps...
🙂