if ($top){ $query="select count(*) as total from data"; $result=mysql_query($query); $message_count=mysql_result($result,0,"total"); if ($key>$message_count) {$key=$message_count;}
?>
熱門新聞訪問排行榜
熱門新聞訪問排行榜Top
名次新聞標題
類別
人氣
$query="select id,detail,title,hits,type from data order by hits desc limit 0,$key"; $result=@mysql_query($query); $rows=@mysql_num_rows($result); $i=1;