Hi
We are trying to use the following global to generate users list:
sub {
# Displays all Users.
my $tags=shift;
my $search_db= $DB->table('links_Users');
my $nh = $tags->{nh};
my $mh = $tags->{maxhits};
my $offset = ($nh-1) * $mh;
$search_db->select_options ('ORDER BY Username ASC',"LIMIT $offset, $mh");
my $sth = $search_db->select;
my $output;
while (my $user = $sth->fetchrow_hashref) {
$output .= qq~<li><a href="$CFG->{db_cgi_url}/page.cgi?page=user&user=$user->{Username}">$user->{Username}</a></li> ~;
}
return $output;
}
We are getting the following error:
Can't call method "fetchrow_hashref" on an undefined value at (eval 19) line 13.
and debug shows:
GT::SQL::error = Failed to execute query: 'SELECT * FROM links_Users ORDER BY Username ASC LIMIT 2.26030162959037e+16, SCALAR(0x8f60db4)': You have an error in your SQL syntax near 'SCALAR(0x8f60db4)' at line 1
@INC =
Regards
KaTaBd
Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
We are trying to use the following global to generate users list:
sub {
# Displays all Users.
my $tags=shift;
my $search_db= $DB->table('links_Users');
my $nh = $tags->{nh};
my $mh = $tags->{maxhits};
my $offset = ($nh-1) * $mh;
$search_db->select_options ('ORDER BY Username ASC',"LIMIT $offset, $mh");
my $sth = $search_db->select;
my $output;
while (my $user = $sth->fetchrow_hashref) {
$output .= qq~<li><a href="$CFG->{db_cgi_url}/page.cgi?page=user&user=$user->{Username}">$user->{Username}</a></li> ~;
}
return $output;
}
We are getting the following error:
Can't call method "fetchrow_hashref" on an undefined value at (eval 19) line 13.
and debug shows:
GT::SQL::error = Failed to execute query: 'SELECT * FROM links_Users ORDER BY Username ASC LIMIT 2.26030162959037e+16, SCALAR(0x8f60db4)': You have an error in your SQL syntax near 'SCALAR(0x8f60db4)' at line 1
@INC =
Regards
KaTaBd
Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory