Jump to content

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!  ???

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.