Jump to content

Adding SQL Results


JamesTalbot

Recommended Posts

Hello,

 

I run a league for a online game and i would like to add a Countries Standings where you can see which country is the best.

 

I have a users table with the column Username, Country, Wins, Losses, Points, Played.

 

I would like to know how i add up each of the rows where the country is say "United Kingdom" etc etc .

 

Your help is greatly appreciated.

 

Thanks,

 

James

Link to comment
https://forums.phpfreaks.com/topic/71289-adding-sql-results/
Share on other sites

Hi Thanks for that however still a few questions.

 

That query lists the countries however it only show 1 user's points/wins/games/losses  eg.

 

1 United Kingdom - L4LoKul2A  6 9 5 1

2 France - Darkmaul  6 6 4 2

3 Germany - Tower  4 2 2 2

4 Poland - nano  2 1 1 1

5 Italy - Face  0 0 0 0

 

How do i add all the users points together and group by country?

 

Thanks!

 

James

Link to comment
https://forums.phpfreaks.com/topic/71289-adding-sql-results/#findComment-358662
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.