Location: PHPKode > projects > FeedMeLinks, Social BookmarkingSince2002 > modules/highest-linking-users.inc.php
<%
	include_once( "$modules/utils.inc.php" );

	$limit = $limit ? $limit : 7;
	$qs = "SELECT COUNT(*) AS lc, submitter AS u FROM links GROUP BY submitter ORDER BY lc DESC LIMIT $limit;";

	$con = mysql_connect();
	mysql_selectdb( getDBName() );
	$q = mysql_query( $qs );
	if( $q )
		$numRows = mysql_num_rows( $q );
	for( $i = 0; $i < $numRows; $i++ ) {
		$count = mysql_result($q,$i,"lc");
		$user = mysql_result($q,$i,"u");
%>
<div class="r<%= $i % 2 == 0 ? 1 : 0 %><%= $i == $limit - 1 ? " last" : "" %>">
	<%= makeNamedUserLink( $user, $count . " links" ) %> - <%= makeUserLink( $user ) %> 
	<span class="subtle">(<%= getFloridUserAgeInDays( $user ) %>)</span>
</div> <%
	}

	mysql_close( $con );
%>
Return current item: FeedMeLinks, Social BookmarkingSince2002