You should have a better look at the error messages you get
Unable to compile 'users_list': Global symbol "$db" requires explicit package name at (eval 696) line 6. Global symbol "$row" requires explicit package name at (eval 696) line 8. Global symbol "$row" requires explicit package name at (eval 696) line 8.
This simply tells you that you have to code use'ing strict. If you do the following changes, it will work:
# Displays all Users.
my $search_db= $DB->table('Users');
$search_db->select_options ('ORDER BY Username DESC');
my $sth = $search_db->select;
my $output;
while (my $user = $sth->fetchrow_hashref) {
$output .= qq~<a href="$CFG->{db_cgi_url}/page.cgi?page=user&user=$user->{Username}">$user->{Username}</a><br /> ~;
}
return $output;
}
Ivan
-----
Iyengar Yoga Resources / GT Plugins
Unable to compile 'users_list': Global symbol "$db" requires explicit package name at (eval 696) line 6. Global symbol "$row" requires explicit package name at (eval 696) line 8. Global symbol "$row" requires explicit package name at (eval 696) line 8.
This simply tells you that you have to code use'ing strict. If you do the following changes, it will work:
Code:
sub { # Displays all Users.
my $search_db= $DB->table('Users');
$search_db->select_options ('ORDER BY Username DESC');
my $sth = $search_db->select;
my $output;
while (my $user = $sth->fetchrow_hashref) {
$output .= qq~<a href="$CFG->{db_cgi_url}/page.cgi?page=user&user=$user->{Username}">$user->{Username}</a><br /> ~;
}
return $output;
}
Ivan
-----
Iyengar Yoga Resources / GT Plugins