Jump to content

Help with database


perryratcliff

Recommended Posts

Not sure if I can post this here, or if I should go to a mySQL forum but...    :wtf:

I'm trying to keep track of my user's "score". Each time they do a certain thing they get a preset amount of points, depending on what they did. The way I see it would be having a table that is joined to the user's ID, and have a column for each task. Then when they do a task the number in that column will go up. Then I will multiply that number by amount the task is worth. I can't just adjust there score because they need to be able to see what they did.

 

So I hope that made sense. And if you know a better way to deal with this please let me know!

Link to comment
Share on other sites

Have a table with

username or id (varchar)

task_name (varchar)

task_stage or task_part (int)

task_score (int)

 

Each time they complete a task or part of a quest, whatever you wanna call it, then insert a new row into that table.

For example

 

Row1:  ttocskcaj    kill_orc    1    10

Row2:  ttocskcaj    kill_orc    1    20

 

For the task Kill Orc, I have completed 2 stages, and have got 30 points overall.

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.