duke
02-11-2002, 09:46 PM
Im trying to disply the top viewed threads and did now find a hack to do this. So I tried this but it dont work any ideas on how I can complete this.
// Top 10 Viewed Threads//
$top = "10"; // change this to the number of top thread views you want to disply.
echo("<table border=0 cellpadding=0 cellspacing=0><tr><td><b>Top Viewed Threads </b></td></tr>");
$topthread = mysql_query("SELECT COUNT(*) AS count,title,views FROM thread ORDER BY count DESC LIMIT $top;");
$lugar=1;
while ($topview = mysql_fetch_array($topthread)):
if (($counter++ % 2) != 0);
echo("<tr><td><strong><big>·</big></strong> $lugar: <a href=\"$bburl/showthread.php?&$topthread[title]\">$topthread[threadid]</a></td><td align=\"center\">$topthreads[views]</td></tr>");
$lugar++;
endwhile;
echo("</table>");
echo("<br>");
// Top 10 Viewed Threads//
$top = "10"; // change this to the number of top thread views you want to disply.
echo("<table border=0 cellpadding=0 cellspacing=0><tr><td><b>Top Viewed Threads </b></td></tr>");
$topthread = mysql_query("SELECT COUNT(*) AS count,title,views FROM thread ORDER BY count DESC LIMIT $top;");
$lugar=1;
while ($topview = mysql_fetch_array($topthread)):
if (($counter++ % 2) != 0);
echo("<tr><td><strong><big>·</big></strong> $lugar: <a href=\"$bburl/showthread.php?&$topthread[title]\">$topthread[threadid]</a></td><td align=\"center\">$topthreads[views]</td></tr>");
$lugar++;
endwhile;
echo("</table>");
echo("<br>");