Top mais acedidos

filmes

9 ORDER BY view DESC LIMIT 20"; $result = mysql_query($query); if(mysql_num_rows($result) < 20) { $query = "SELECT code,trad,ano FROM cinebase ORDER BY view DESC LIMIT 20"; $result = mysql_query($query); } $filme = mysql_fetch_array($result); $code = $filme["code"]; echo "\"poster\" 1. " . CorrectTitle($filme["trad"]) . " ({$filme["ano"]})
"; $r = 2; while($filme = mysql_fetch_array($result)) { echo "$r. " . CorrectTitle($filme["trad"]) . " ({$filme["ano"]})
"; $r++; } ?>

Pessoas

9 ORDER BY view DESC LIMIT 20"; $result = mysql_query($query) or die(mysql_error()); if(mysql_num_rows($result) < 20) { $query = "SELECT code,nome FROM pessoas ORDER BY view DESC LIMIT 20"; $result = mysql_query($query); } $r = 1; while($row = mysql_fetch_array($result)) { echo "$r. " . ($r == 1 ? "" : "") . "{$row["nome"]}" . ($r == 1 ? "" : "") . "
"; $r++; } ?>