$result=mysql_query(\"select * from babeloggerv2 where approved = \'yes\' ORDER BY clicks DESC LIMIT 25\");
while($row=mysql_fetch_array($result)){
print\"
$result=mysql_query(\"select id, title, (ratedtotal / ratedtally) AS rating FROM babeloggerv2 where approved = \'yes\' ORDER BY rating DESC LIMIT 25\");
while($row=mysql_fetch_array($result)){
print\"
\";
include_once(\"footer.php\");
?>
Save as top.php or whatever filename you want. You can see it in action @ http://www.deviantbabes.com/top.php. Feel free to post tweaks to this mod as you see fit.