`tourney`
tourney: tourney number (auto increment) and primary key
tourney_date: ...
title: ...
description: brief description
details: long description
start_time: ... (varies)
chip_count: starting chips (varies)
buyin: fee to play (varies)
rebuy: whether or not rebuys are allows (only Y or N)
players: maximum players allowed
cancelled: if the game has been cancelled
finished: if the game has finished
b1d... all those that will be deleted eventually
`donkeys`
donkey: player number (auto increment) and primary key
last_name:
first_name:
nick_name:
email: (must be unique)
password: sha256 hashed
phone:
joined: date joined
photo: url to photo (future implementation)
approved: whether or not I've approved them to play (only Y or N)
invite: whether or not I should invite them (only Y or N)
admin: whether or not they have admin priveliges
`bounty_desc`
bounty_no: primary key (auto increment)
description:
`bounty_value`
bounty_no: primary key (auto increment) (and maybe confusing 'cause it has no relation to bounty_desc.bounty_no)
value: dollar value of bounty
`bounties` (needs to be renamed bounties_won to accomodate bounties being the list of bounties referencing bounty_desc/value)
tourney: primary key
donkey:
description: (reference bounty_desc)
value: (reference bounty_value)
`payout_structure`
payout_no: primary key (auto increment)
description:
min_players:
max_players: (creates a range for determining payouts)
first:
second:
third:
...
tenth: (yeah, looks like this one needs help too)
`invite`
invite_no: (auto increment) (generic index and likely needs to be removed)
tourney:
invite_date:
donkey:
last_name:
first_name:
email: (yep, no need for the names or email here)
invite_code: hashed code that gives them a specific link for themselves (delivery via ?code= in the URL)
`signed_up` (used to help identify people that don't respond as well as list those that can play)
tourney: primary key
donkey: (tourney & donkey must be unique combo)
no_players: (0: can't play; 1: can play)
signup_date:
noshow: did they not show up?
`signin`
tourney: primary key
donkey: (tourney & donkey must be unique combo)
time_in: when they arrived
`busted_out`
bo_index: primary key (auto increment) (and probably useless not that I'm thinking about it; to the best of my recollection I don't reference it for anything.)
tourney: should be primary key
donkey: (tourney & donkey must be unique combo)
time_in: tourney start time or signin time, whichever is later
time_out: when they busted out
`finished` (after everyone has busted out there's a finished button which populates this data and calculates points & cash)
tourney: primary key
donkey: (tourney & donkey must be unique combo)
placed: what position they finished in (tourney & placed must be unique combo)
time_in:
time_out: (yeah, duplicated. Thought it easiest if it's all in one place)
cash: amount won
points: points earned
b1d, b1... (yep, here they are again)
As you can see from some of my comments after looking at it all together I can see some of my mistakes. Some of the insertions of last_name & first_name into tables comes from my wanting to be able to see the data clearly in phpMyAdmin while I'm building the site. For a while I was still struggling with the reading in inserting of data so I wanted to know the correct data was being inserted without having to consult 2, 3 or more tables. If I were more comfortable with JOINs there likely wouldn't be such an issue.
Yeah, I'm real close to finished with it and I've already got a lot of work ahead of me fixing this thing... Oh well, I did this as a learning experience

I suspect I'll be learning every time I sit down to code.