Jump to content

php database help


knoxinator

Recommended Posts

I need help on the code for adding int values to a database.

I am keeping scores each week for a poker club  and each week I need to add the scores into the database so that it shows the total on the webpage.

The page would look like this

 

Name:  

Score:

 

 

and the total scores page would be a table with the name on the left and total score on the right.

It is very important that I can add scores each week that add on top of the total score for that player.

 

Cheers

 

 

Also the tables have already been created on mySQL

Link to comment
https://forums.phpfreaks.com/topic/296223-php-database-help/
Share on other sites

you should store the raw data for each week/game/player as a separate row in a 'result' table, similar to what you do with a bank account statement. then simply do a sum() in a query to produce a score for any player(s) when needed.

 

this will do two things -

 

1) keep a specific record of who, what, when, and where something occurred

 

2) prevent duplicate entries/processing from corrupting the data.

Link to comment
https://forums.phpfreaks.com/topic/296223-php-database-help/#findComment-1511500
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.