[Koha-cvs] CVS: koha/C4 Reserves2.pm,1.33,1.34
Chris Cormack
rangi at users.sourceforge.net
Tue Jun 17 10:48:26 CEST 2003
Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1:/tmp/cvs-serv25354/C4
Modified Files:
Reserves2.pm
Log Message:
Fixing a bug ine sql
Index: Reserves2.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Reserves2.pm,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -r1.33 -r1.34
*** Reserves2.pm 19 May 2003 13:59:12 -0000 1.33
--- Reserves2.pm 17 Jun 2003 08:48:24 -0000 1.34
***************
*** 367,373 ****
# fill in a reserve record....
# FIXME - Remove some of the redundancy here
! my $biblio = $res->{'biblionumber'}; my $qbiblio = $dbh->quote($biblio);
! my $borr = $res->{'borrowernumber'}; $borr = $dbh->quote($borr);
! my $resdate = $res->{'reservedate'}; $resdate = $dbh->quote($resdate);
# get the priority on this record....
--- 367,373 ----
# fill in a reserve record....
# FIXME - Remove some of the redundancy here
! my $biblio = $res->{'biblionumber'}; my $qbiblio =$biblio;
! my $borr = $res->{'borrowernumber'};
! my $resdate = $res->{'reservedate'};
# get the priority on this record....
***************
*** 375,383 ****
{
my $query = "SELECT priority FROM reserves
! WHERE biblionumber = $qbiblio
! AND borrowernumber = $borr
! AND reservedate = $resdate)";
my $sth=$dbh->prepare($query);
! $sth->execute;
($priority) = $sth->fetchrow_array;
$sth->finish;
--- 375,383 ----
{
my $query = "SELECT priority FROM reserves
! WHERE biblionumber = ?
! AND borrowernumber = ?
! AND reservedate = ?";
my $sth=$dbh->prepare($query);
! $sth->execute($qbiblio,$borr,$resdate);
($priority) = $sth->fetchrow_array;
$sth->finish;
***************
*** 388,396 ****
my $query = "UPDATE reserves SET found = 'F',
priority = 0
! WHERE biblionumber = $qbiblio
! AND reservedate = $resdate
! AND borrowernumber = $borr";
my $sth = $dbh->prepare($query);
! $sth->execute;
$sth->finish;
}
--- 388,396 ----
my $query = "UPDATE reserves SET found = 'F',
priority = 0
! WHERE biblionumber = ?
! AND reservedate = ?
! AND borrowernumber = ?";
my $sth = $dbh->prepare($query);
! $sth->execute($qbiblio,$resdate,$borr);
$sth->finish;
}
More information about the Koha-cvs
mailing list