<?
$array = DB::$dbs->query( "SELECT DISTINCT `us`, COUNT(`us`) AS PostCount FROM `forum_p` GROUP BY `us` ORDER BY PostCount DESC LIMIT 5" );
if ( $array->rowCount() == 0 ) {
echo '<div class="lst">Пусто...</div>';
}
while ( $arr = $array->fetch() ) {
echo '<div class="list1"> ' . uNick( $arr[ 'us' ] ) . ' (постов: ' . DB::$dbs->querySingle( "SELECT count(*) FROM `forum_p` WHERE us = ?", array(
$arr[ 'us' ]
) ) . ')</div>';
}
?>