循环MySQL并使用PHP添加点

I am creating a leaderboard system for our social dart club. I have a MySQL database with players names and their points

Example:

Name      Date            Place        Points
John      11-01-2015      1st          10
Anthony   12-01-2015      1st          10
Andre     13-01-2015      1st          10
John      14-01-2015      1st          10

I need to loop through the table for each player, calculate the total points and output it leaderboard style

The top database result to

Name                          Points
John                          20
Andre                         10
Anthony                       10
SELECT name, SUM(points) AS points
  FROM table1
GROUP BY name
ORDER BY 2 DESC;

Build a GROUP BY and order desc by the SUM column.

Maybe you need some filter place

SELECT name, SUM(points) AS points
  FROM table1
WHERE place = '1st'
GROUP BY name
ORDER BY 2 DESC;