Well, its Great that you do this, I'm sure you make a lot of people happy, which is pretty much why I do what I do, with this club of mine. It sure ain't because of the pay, there isnt any lol<br><br>Guess What? I spoke too soon, it looks like it adds up everything correctly, but the sorting order is not right now lol<br><br>Heres what the results look like<br><br>BAA_Kitkat 13 <br><br>BAA_Adam 11 <br><br>BAA_Pip 12 <br><br>BAA_Zed 7 <br><br>a 4 <br><br>baa 3 <br><br>dfdfdfdf 3 <br><br>testerrrrrrrr 3 <br><br>fp 3 <br><br>BAA_Pamjimo 3 <br><br>test 1 <br><br>Heres the complete script, I did try to Order By Name, Winner, Loser, Losses, Wins etc<br><br>And I even tried the AS and Group BY thing, neither worked. :-(<br>// create connection <br>// test connection <br>// select database <br>// test selection <br><br>$query = "SELECT Winner,SUM(Wins) as sWins FROM submitwk1 GROUP BY Winner ORDER BY sWins DESC"; <br><br>$mysql_result = mysql_query($query,$connection); <br>print ("<B>"

;<br>print ("<Center>"

;<br>print ("<TABLE BORDER=\"4\">\n"

; <br>print ("<TR>\n"

;<br>print ("<TD BGCOLOR=\"#cccccc\"><B><font size='8'>Member Name</font><B></TD>\n"

;<br>print ("<TD BGCOLOR=\"#cccccc\"><B><font size='8'>Points</font><B></TD>\n"

;<br><br>print ("<TR>\n"

;<br><br><br><br>while ($row = mysql_fetch_array($mysql_result))<br> { <br>$name = $row[0]; <br>$Wins = $row[1]; <br><br>$query2 = "SELECT SUM(Losses) FROM submitwk1 WHERE Loser='$name'"; # now create a sql query to get a summary of wins from all lost games<br><br>$mysql_result2 = mysql_query($query2,$connection); <br>$row1 = mysql_fetch_row($mysql_result2);<br><br>$SumWins = $Wins+$row1[0]; #here we have the summary of all wins per Player!<br><br>print ("<TR>\n"

;<br>print ("<TD><font size='5'>$name</font></TD>\n"

;<br>print ("<TD><font size='5'>$SumWins</font></TD>\n"

;<br>print ("<TR>\n"

;<br><br><br>} <br><br><br><br>// free resources and close connection <br>mysql_free_result($sql_result); <br><br>Thanks,<br>Rhyan<br><br>You have a good weekend too, unfortunately I still have more non PHP work to do this weekend lol<br><br>