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
https://forums.phpfreaks.com/topic/224287-help-with-database/
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
https://forums.phpfreaks.com/topic/224287-help-with-database/#findComment-1158827
Share on other sites

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.