'$timesrated' order by avg_rating desc limit 10"; /* $q = " select timesrated,location, (totalrating / timesrated) as avg_rating from image where timesrated > 1 and active = 1 and server = '$server' order by avg_rating desc limit 10"; */ $r = mysql_query($q); $output[] = << Song Times Rated Avg Rating EOF; while($rs = mysql_fetch_array($r)) { $avg_rating = number_format($rs["avg_rating"],2); $output[] = << $rs[location] $rs[timesrated] $avg_rating EOF; } $output[] = ""; $main = implode("\n",$output); include "page.inc"; ?>