Jump to content

Getting a cumulative total of the three preceding columns in MySQL


lowe_22

Recommended Posts

Hi,
I've got a table in my database which has a user name then three other columns, each column is the number of first/second/third place wins in a competetion (respectively). I want to be able to have some kind of running total column that adds up all the numbers from each preceding column for each member.

I know this is not possiuble in MySQL as it is a not a dynamic language. My end results, however, is to output (via PHP) the membername with the most wins - starting with the most first place wins, then the second wins then the third. Understand?
So its not just a case of the person with the most placings wins - butthe person with the highest number of 1st place, tehn 2nd place, then 3rd place wins?

Any ideas?
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.