Топ авторов

<? $res = db_query('SELECT u.uid, u.name, (SELECT COUNT(*) FROM notsent_node n WHERE n.uid = u.uid) as nodes, (SELECT COUNT(*) FROM notsent_comments c WHERE c.uid = u.uid) as comments FROM notsent_users u WHERE uid > 1 ORDER BY nodes desc, comments desc LIMIT 100'); $counter = 1; while ($u = db_fetch_object($res)) { echo ''; $counter++; } ?>
Пользователь Публикаций Комментариев
'.$counter.''.l($u->name, 'user/'.$u->uid, array()).''.$u->nodes.''.$u->comments.'
Nike Paul George PG1