Home : Products : Gossamer Forum : Development, Plugins and Globals :

Products: Gossamer Forum: Development, Plugins and Globals: Re: [Paul] is there tag like newest_user?: Edit Log

Here is the list of edits for this post
Re: [Paul] is there tag like newest_user?
In Reply To:
You don't touch globals.txt....you use the globals option in the control panel.

eg...

Code:
sub {
my $table = $DB->table('User');
$table->select_options("ORDER BY user_registered DESC", "LIMIT 1");
return $table->select( 'user_username' )->fetchrow;
}

That should give you the newest user.

Hello

what ist the sub for the last ten users ?


my global dosent work

Code:
sub { my $tags = shift;my $user_db = $DB->table('User');
$user_db->select_options("ORDER BY user_registered DESC', 'LIMIT 10');
my $sth = $user_db->select;my @output;
while (my $user = $sth->fetchrow_hashref) {push @output, $user;}
return { user_loop => \@output };}


Whats the Reason?

mfg hoefti
linktobuy Web Directory
Ratgeber Recht

Last edited by:

hoefti: Oct 5, 2002, 8:06 AM

Edit Log: