"Select count(*) from issues where borrowernumber='$borrowernumber' and
returndate is NULL";
- $debug and print $query, "\n";
+ $debug and warn $query."\n";
my $sth = $dbh->prepare($query);
$sth->execute;
my $data = $sth->fetchrow_hashref;
my $sth = $dbh->prepare($query);
$sth->execute( $category, $sortvalue );
my $lib = $sth->fetchrow;
- return ($lib);
+ return ($lib) if ($lib);
+ return ($sortvalue) unless ($lib);
}
=head2 DeleteBorrower