php - Running race joinning with specific category or ticket -


i have php/mysql website signup , payment running races.

my main problem (which blocks me @ all) is, user sign up, , pay inscription single race. single race has mysql field "price". running race <-> single price.

in month have new event, , organizer wants multiple prices different runners (depending age, child, senior, etc)

my actual mysql schema is

users (**id**, username, password, email) user_profiles (user_id, name, surname, gender, birthdate, etc...) events (**id**, name_desc, date, price, ...) registrations (id, user_id, event_id, signup_date, bank_order, bank_result) 

i imagine user website flow, don't know how implement in db. flow be: - types spanish id card. - system check if it's joined previously. - if not, user fills personal data form. - (new) click category/ticket/price user. - adds user "cart". - pay runners in single payment.


ex: http://www.cronometrajes.com/en/guest_signup/race/ii_carrera_popular_olleros_de_sabero

test id: 71000000n

spanish phone format: [0-9]{9} ex: 666554433


due website schema, don't know how improve actual site other feature.

i hope have explained perfect. sorry bad english.

this simple , there already. know need multiple prices per event. means need sort of event price list object relates event. can have many prices per event.

so create like

event_price_list (id, event_id, max_age, price) 

so data like

id, event_id, max_age, price 1,  1,        10,        80 2,  1,        18,        100 3,  1,        21,        140  4,  1,        60,        60 

now can use event table event price lists , using age work out price list want. potentially create table called age_brackets or relate child, adult, senior actual ages if want , referenced in price list table or manage in code. there couple of variations, should started.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -