Jump to content

Database Design: Personal Training Sessions


hwcasey12

Recommended Posts

PHP/MYSQL

I am really struggling with how to setup a table (or two) in my database for an application at work. 

 

Example: My company sells training packages.  A client will get a package of 30 sessions.  Each week the trainer logs in and records their training for the week, deducting off each client's balance of sessions. 

 

The part of tracking total sessions purchased seems logical, but I can't figure out how to track sessions used, so that I can have a historical picture of the date it was used, but also total so I can deduct from their total purchased.  Here is my thought, but I think it is weak  :-\.

 

TABLE: clientusedsessions

ID - unique identifier

DATE - date of session used (don't need time)

INT - session used (so it is easy to total)

 

Seems like a ton of tables if we have over 200 clients (and growing), which is fine, but I am guessing I am overlooking a simpler method.

 

Thanks!  ???

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.