DjSap
03-21-2002, 12:54 PM
Im working on a toplist thingy for my board, below is my query for getting the sites listed sorted after hits in, what I cant figure out is how to show the sites rank, can anybody help me out?
$toplistbits = $DB_site->query("SELECT * FROM toplist_sites ORDER BY topin DESC");
while ($toplist=$DB_site->fetch_array($toplistbits) and ++$bgcounter) {
$bgcolor=iif($bgcounter%2==0,'{firstaltcolor}','{s econdaltcolor}');
$topid = $toplist[topid];
$title = $toplist[title];
$description = $toplist[description];
$url = $toplist[url];
$in = $toplist[topin];
$out = $toplist[topout];
eval("\$toplistbit .= \"".gettemplate("toplistbit")."\";");
}
$toplistbits = $DB_site->query("SELECT * FROM toplist_sites ORDER BY topin DESC");
while ($toplist=$DB_site->fetch_array($toplistbits) and ++$bgcounter) {
$bgcolor=iif($bgcounter%2==0,'{firstaltcolor}','{s econdaltcolor}');
$topid = $toplist[topid];
$title = $toplist[title];
$description = $toplist[description];
$url = $toplist[url];
$in = $toplist[topin];
$out = $toplist[topout];
eval("\$toplistbit .= \"".gettemplate("toplistbit")."\";");
}