CHaines2010 Posted July 20, 2010 Share Posted July 20, 2010 Hi guys, I am currently making a booking system for my website which books people on tours. There are roughly 30 options which can be picked from, and some of these have pre requisites of other options, there are about 3 layers of pages to make this easier. I need to be able to add new fields to the form from an admin panel, so these fields will need to be stored in a database. I have a booking table which stores core information such as payment details, client details, session id etc. The options need to have a price, description, and value. Sometimes the options will be drop down boxes so maybe an array of available options needs to be stored. Im struggling to get my head round how I can store the fields as meta data in the database (mainly due to having multiple values for drop down boxes as this no longer becomes 1 line item), then record a set of values for each booking. Currently I have the following design in mind: Booking table as describe as above. Options table which stores the fields [id, name, description, field_type, allowed values (maybe a comma separated list), price (maybe a comma seperated list to match the values), pre req, page/form to display on] Booking details table which uses a secondary key of the booking id so I can grab all available options for each booking [auto inc PK, option id, booking id, value] I will then need to capture the post data without known the incoming fields. To me, this design doesn't seem robust enough and could result in significant amount of line items in the booking details table per order. Has anybody created a booking system like this before? If so would you be able to shed some light on how you went about it please? Thanks in advance, Chris Quote Link to comment https://forums.phpfreaks.com/topic/208327-booking-system-design-help/ 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.