Last 5 Users To Join
|
|
By bbatchel , Section Code [] Posted on Wed Jan 24, 2001 at 12:00:00 PM PST
|
|
Below is code I have written that creates a box that shows the last 5 people to join the site. I really think this is only cool for small sites..but maybe I am wrong.
The code would work alot better (be more accurate) if there is a date field in the users table. But this seems to work fine using the UID of the user which should keep getting larger and large as more users are added.
|
my $content;
my ($rv, $sth) = $S->db_select({
WHAT => 'uid, nickname',
FROM => 'users',
ORDER_BY => 'uid DESC',
LIMIT => '5'});
while (my $user = $sth->fetchrow_hashref())
{
$content .= qq{$user->{nickname} };
}
return {content => $content};
|
|
Story Views
|
18 Scoop users have viewed this story.
|
|