$sth = $dbh->prepare("select * from borrowers where borrowernumber=?");
$sth->execute($borrowernumber);
} elsif ($cardnumber) {
- $sth = $dbh->$prepare("select * from borrowers where cardnumber=?");
+ $sth = $dbh->prepare("select * from borrowers where cardnumber=?");
$sth->execute($cardnumber);
} else {
$env->{'apierror'} = "invalid borrower information passed to getpatroninformation subroutine";
my $usth = $dbh->prepare("update accountlines set amountoutstanding= ?
where (borrowernumber = ?)
and (accountno=?)");
- $usth->execute($amtos,$data->{'borrowernumber'},'$thisacct');
+ $usth->execute($newamtos,$data->{'borrowernumber'},'$thisacct');
$usth->finish;
$usth = $dbh->prepare("insert into accountoffsets
(borrowernumber, accountno, offsetaccount, offsetamount)
items.biblionumber=biblio.biblionumber and
items.biblioitemnumber=biblioitems.biblioitemnumber and returndate is null
$crit order by issues.date_due");
- $sth->execute($borrownumber);
+ $sth->execute($borrowernumber);
while (my $data = $sth->fetchrow_hashref) {
# FIXME - The Dewey code is a string, not a number.
$data->{'dewey'}=~s/0*$//;
sub findguarantor{
my ($bornum)=@_;
my $dbh = C4::Context->dbh;
- my $sth=$dbh->prepare("select guarantor from borrowers where borrowernumber=?"");
+ my $sth=$dbh->prepare("select guarantor from borrowers where borrowernumber=?");
$sth->execute($bornum);
my $data=$sth->fetchrow_hashref;
$sth->finish;
my @temp=split(/\|/,$search->{'class'});
my $count=@temp;
$query.= "and ( itemtype=?";
- push(@bind,$item[0]);
+ push(@bind,$temp[0]);
for (my $i=1;$i<$count;$i++){
$query.=" or itemtype=?";
push(@bind,$temp[$i]);
$sth->finish;
$sth=$dbh->prepare("Select biblionumber from bibliosubject where subject
like ? group by biblionumber");
- $sth->execute(%$search->{'keyword'}%);
+ $sth->execute("%".$search->{'keyword'}."%");
while (my $data=$sth->fetchrow_hashref){
$query="Select * from biblio,biblioitems where
biblio.biblionumber=? and
biblio.biblionumber=bibliosubtitle.biblionumber
where
(((title like ? or title like ?)";
- @bind=("$key[0]%,"% $key[0]%");
+ @bind=("$key[0]%","% $key[0]%");
while ($i<$count){
$query .= " and (title like ? or title like ?)";
push(@bind,"$key[$i]%","% $key[$i]%");
$i++;
}
$query.=") or ((subtitle like ? or subtitle like ?)";
- push(@bind,"$key[0]%,"% $key[0]%");
+ push(@bind,"$key[0]%","% $key[0]%");
for ($i=1;$i<$count;$i++){
$query.=" and (subtitle like ? or subtitle like ?)";
push(@bind,"$key[$i]%","% $key[$i]%");
}
$query.=") or ((seriestitle like ? or seriestitle like ?)";
- push(@bind,"$key[0]%,"% $key[0]%");
+ push(@bind,"$key[0]%","% $key[0]%");
for ($i=1;$i<$count;$i++){
$query.=" and (seriestitle like ? or seriestitle like ?)";
push(@bind,"$key[$i]%","% $key[$i]%");
}
$query.=") or ((unititle like ? or unititle like ?)";
- push(@bind,"$key[0]%,"% $key[0]%");
+ push(@bind,"$key[0]%","% $key[0]%");
for ($i=1;$i<$count;$i++){
$query.=" and (unititle like ? or unititle like ?)";
push(@bind,"$key[$i]%","% $key[$i]%");
$query="select * from biblioitems,biblio where biblio.biblionumber=biblioitems.biblionumber";
my @temp=split(/\|/,$search->{'class'});
my $count=@temp;
- $query.= " and ( itemtype= ?);
+ $query.= " and ( itemtype= ?)";
@bind=($temp[0]);
for (my $i=1;$i<$count;$i++){
$query.=" or itemtype=?";
} elsif ($search->{'illustrator'} ne '') {
$query="select * from biblioitems,biblio
where biblio.biblionumber=biblioitems.biblionumber
- and biblioitems.illus like ?;
+ and biblioitems.illus like ?";
@bind=("%".$search->{'illustrator'}."%");
} elsif ($search->{'publisher'} ne ''){
$query = "Select * from biblio,biblioitems where biblio.biblionumber
}
if ($search->{'publisher'} ne ''){
$query.= " and (publishercode like ?)";
- push(@bind,"%$search->{'publisher'}%";
+ push(@bind,"%$search->{'publisher'}%");
}
my $sti=$dbh->prepare($query);
$sti->execute(@bind);
my $dbh = C4::Context->dbh;
my $sth;
if ($bornum eq ''){
- $sth=$dbh->prepare("Select * from borrowers where cardnumber=?";
+ $sth=$dbh->prepare("Select * from borrowers where cardnumber=?");
$sth->execute($cardnumber);
} else {
- $sth=$dbh->prepare("Select * from borrowers where borrowernumber=?";
+ $sth=$dbh->prepare("Select * from borrowers where borrowernumber=?");
$sth->execute($bornum);
}
my $data=$sth->fetchrow_hashref;
my ($title,$isbn,$z3950random) = @_;
my $dbh = C4::Context->dbh;
my $count = 0;
- my $query,@bind;
+ my ($query,@bind);
my $sth;
my @results;
my ($isbn,$title) = @_;
my $dbh = C4::Context->dbh;
my $count = 0;
- my $query,@bind;
+ my ($query,@bind);
my $sth;
my @results;