Hi again. I am trying to output the results just like you said. I use the following code: <?php mysql_pconnect("localhost","",""); mysql_select_db(""); $query = "SELECT loginid,SUM(week1+week2) FROM submit1 GROUP BY loginid ORDER BY 'SUM(week1)+SUM(week2)' DESC"; $result = mysql_query($query); while ($list = mysql_fetch_array($result)) { echo "{$list['loginid,SUM(week1)+SUM(week2) ']}<br>"; } ?> I am struggling with 2 things. 1)The command DESC isn't working,numbers aren't showing up in descending order. 2)Inside the 'echo' statement something isn't right, I guess it is a syntax error,I want the output to be in a chart ,for example: John|75 Mary|70 Mike|60 and so on. Thank you very much for your help.