For those of you who want to list the Top 10, here is the code.
Thanks to
www.devshed.com!
PHP Code:
$query = "select uid, newthread+reply+view+admin_mod+morereply+totalpenalty as total from storepoint order by total desc limit 0,10";
$my_q = mysql_query($query) or die(mysql_error());
$row_count = mysql_num_rows($my_q);
for ($i=0; $i<$row_count; $i++) {
list($uid, $total) = mysql_fetch_row($my_q);
$my_q2 = mysql_query("select username from user where userid='$uid'") or die(mysql_error());
list($username) = mysql_fetch_row($my_q2);
print "$username has $total points<br>";
mysql_free_result($my_q2);
}
mysql_free_result($my_q);
All the fields have to be not null.