Hi,
You can do this with your own global. Add a global:
top10_users
that has:
my $output;
my $user_tb = $DB->table('User');
$user_tb->select_options("ORDER BY user_posts DESC", "LIMIT 10");
my $sth = $user_tb->select;
while (my $user = $sth->fetchrow_hashref) {
$output .= qq~
<a href="gforum.cgi?username=$user->{user_username}">$user->{user_username} ($user->{user_posts})</a><br>
~;
}
return $output;
}
Then just put <%top10_users%> wherever you want the user list displayed. Hope that helps,
Alex
--
Gossamer Threads Inc.
You can do this with your own global. Add a global:
top10_users
that has:
Code:
sub { my $output;
my $user_tb = $DB->table('User');
$user_tb->select_options("ORDER BY user_posts DESC", "LIMIT 10");
my $sth = $user_tb->select;
while (my $user = $sth->fetchrow_hashref) {
$output .= qq~
<a href="gforum.cgi?username=$user->{user_username}">$user->{user_username} ($user->{user_posts})</a><br>
~;
}
return $output;
}
Then just put <%top10_users%> wherever you want the user list displayed. Hope that helps,
Alex
--
Gossamer Threads Inc.