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

	$limit = $limit ? $limit : 7;
	$qs = "SELECT COUNT(*) as nl, u.ID, u.userid as u
                        FROM links AS l, linksUsers AS u
                        WHERE u.userid = l.submitter                                              
                        GROUP BY u.userid 
                        HAVING COUNT(*) > 2
                        ORDER BY u.ID 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++ ) {

		$numLinks = mysql_result($q,$i,"nl");
		$user = mysql_result($q,$i,"u");
%>
<div class="r<%= $i % 2 == 0 ? 1 : 0 %><%= $i == $limit - 1 ? " last" : "" %>">
	<%= makeNamedUserLink( $user, "$numLinks  links" ) %> - <%= makeUserLink( $user ) %> 
	<span class="subtle">(<%= getFloridUserAgeInDays( $user ) %>)</span>
</div> <%
	}

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