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?

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.