Jump to content

Table Structure and date question


SilentDeath

Recommended Posts

Hello,

 

I plan on running a contest of sorts and I would like to know how to best count the amount of points accumulated in a day. At the moment i just have a setup with id | name |  points. Would I have to create a new column for each day or something like that?

 

Any help would be much appreciated. Thanks.

Link to comment
Share on other sites

I would have two tables at that point, something like:

 

The points table:

P_ID | P_DATE | P_POINTS

 

The user table:

U_ID | U_USERNAME

 

where U_ID -> P_ID and every day a new row is inserted (would probably be a cron job) in the points table with the points accumulated for the day.

Link to comment
Share on other sites

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.