if (@$data){
return ( scalar(@$data), $data );
}
- $sth->finish;
if ( $type eq "simple" ) # simple search for one letter only
{
my @results;
$data = $sth->fetchall_arrayref({});
- $sth->finish;
return ( scalar(@$data), $data );
}
$accessflagshash->{$flag} = 1;
}
}
- $sth->finish;
$borrower->{'flags'} = $flags;
$borrower->{'authflags'} = $accessflagshash;
my $sth = $dbh->prepare($query);
$sth->execute($borrowernumber);
my $issue_count = $sth->fetchrow_arrayref->[0];
- $sth->finish;
$sth = $dbh->prepare(
"SELECT COUNT(*) FROM issues
);
$sth->execute($borrowernumber);
my $overdue_count = $sth->fetchrow_arrayref->[0];
- $sth->finish;
$sth = $dbh->prepare("SELECT SUM(amountoutstanding) FROM accountlines WHERE borrowernumber = ?");
$sth->execute($borrowernumber);
my $total_fines = $sth->fetchrow_arrayref->[0];
- $sth->finish;
return ($overdue_count, $issue_count, $total_fines);
}
my @dat;
my $data = $sth->fetchall_arrayref({});
- $sth->finish;
return ( scalar(@$data), $data );
}
|;
my $sth3 = $dbh->prepare($guaquery);
$sth3->execute;
- $sth3->finish;
}
}
=head2 GetPendingIssues
$result[$i] = $data2;
$i++;
}
- $sth2->finish;
}
- $sth->finish;
return ( $i, \@result );
}
$total += int(1000 * $data->{'amountoutstanding'}); # convert float to integer to avoid round-off errors
}
$total /= 1000;
- $sth->finish;
return ( $total, \@acctlines,$numlines);
}
$total += int(100 * $data->{'amountoutstanding'});
}
$total /= 100;
- $sth->finish;
return ( $total, \@acctlines, $numlines );
}
$sth->execute( uc($surname), ucfirst($firstname));
}
my @data = $sth->fetchrow;
- $sth->finish;
( $data[0] ) and return $data[0], $data[1];
return 0;
}
else {
return 0;
}
- $sth->finish();
}
push @codes, $data->{'categorycode'};
$labels{ $data->{'categorycode'} } = $data->{'description'};
}
- $sth->finish;
return ( \@codes, \%labels );
}
$sth->execute($catcode);
my $data =
$sth->fetchrow_hashref;
- $sth->finish();
return $data;
}
return;
$sth->execute;
my $data =
$sth->fetchall_arrayref({});
- $sth->finish();
return $data;
} # sub getborrowercategory
push @codes, $data->{'code'};
$labels{ $data->{'code'} } = $data->{'name'};
}
- $sth->finish;
return ( \@codes, \%labels );
}
my $sth = $dbh->prepare("Select name from ethnicity where code = ?");
$sth->execute($ethnicity);
my $data = $sth->fetchrow_hashref;
- $sth->finish;
return $data->{'name'};
} # sub fixEthnicity
while ( my $data = $sth->fetchrow_hashref() ) {
$orgs{ $data->{'borrowernumber'} } = $data;
}
- $sth->finish();
return ( \%orgs );
} # sub get_institutions
foreach my $otherborrowernumber (@$otherborrowers) {
$sth->execute( $borrowernumber, $otherborrowernumber );
}
- $sth->finish();
} # sub add_member_orgs
#test to know if the table contain some records if no the function return nothing
my $id = @id;
- $sth->finish;
if ( $id == 1 ) {
# all we have is the one blank row
return ();
WHERE borrowernumber=?|;
my $sth = $dbh->prepare($query);
$sth->execute($borrowernumber);
- $sth->finish;
$query = "
DELETE
FROM borrowers
";
$sth = $dbh->prepare($query);
$sth->execute($borrowernumber);
- $sth->finish;
logaction("MEMBERS", "DELETE", $borrowernumber, "") if C4::Context->preference("BorrowersLog");
return $sth->rows;
}
#test to know if the table contain some records if no the function return nothing
my $id = @id;
- $sth->finish;
if ( $id eq 0 ) {
return ();
}