Jump to content

php database help


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






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.





Also the tables have already been created on mySQL

Link to comment
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
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.

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.