All pastes #730298 Raw Edit

Someone

public text v1 · immutable
·published 2007-10-09 02:52 UTC
rendered paste body
$data = "select count(id) as total, to_member, avg(votes) as votes from voting group by to_member order by votes DESC limit 40";
$result = mysql_query($data) or die (mysql_error());
$num= 1;

while($ratings = mysql_fetch_assoc($result)) { 
$rateavg   =$ratings['votes'];
$votename  =$ratings['to_member'];
$total     =$ratings['total'];

echo "&num=".$num."<br>";
echo "&votename=".$votename."<br>";
}