// Complete source code for the ranking. // you can set topXX on your own! The input value is the top number, the Top number, the top news, the Top news, the top news, and the Top news.
// Complete source code for ranking
// You can set top XX on your own! The input value is the top value.
$ 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 news access rankings
Top news rankings
Ranking News title
Category Popularity
$ 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;
While ($ myrow = @ mysql_fetch_array ($ result )){
?>
$ Myrow [title]
$ Myrow [type]
$ Myrow [hits] "?>
$ I ++;
If ($ I <= $ rows) {echo "";}
}
?> Top news popularity rankings
>
[Close the window]
// News popularity ranking from my news publishing system