From 63fc432b9e8a06a5d6cf02e79e0640e21459cf17 Mon Sep 17 00:00:00 2001 From: rangi Date: Tue, 17 Jun 2003 08:48:24 +0000 Subject: [PATCH] Fixing a bug ine sql --- C4/Reserves2.pm | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/C4/Reserves2.pm b/C4/Reserves2.pm index 71d8a83a3d..8111ff1412 100755 --- a/C4/Reserves2.pm +++ b/C4/Reserves2.pm @@ -366,19 +366,19 @@ sub FillReserve { # 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); + my $biblio = $res->{'biblionumber'}; my $qbiblio =$biblio; + my $borr = $res->{'borrowernumber'}; + my $resdate = $res->{'reservedate'}; # get the priority on this record.... my $priority; { my $query = "SELECT priority FROM reserves - WHERE biblionumber = $qbiblio - AND borrowernumber = $borr - AND reservedate = $resdate)"; + WHERE biblionumber = ? + AND borrowernumber = ? + AND reservedate = ?"; my $sth=$dbh->prepare($query); - $sth->execute; + $sth->execute($qbiblio,$borr,$resdate); ($priority) = $sth->fetchrow_array; $sth->finish; } @@ -387,11 +387,11 @@ sub FillReserve { { my $query = "UPDATE reserves SET found = 'F', priority = 0 - WHERE biblionumber = $qbiblio - AND reservedate = $resdate - AND borrowernumber = $borr"; + WHERE biblionumber = ? + AND reservedate = ? + AND borrowernumber = ?"; my $sth = $dbh->prepare($query); - $sth->execute; + $sth->execute($qbiblio,$resdate,$borr); $sth->finish; } -- 2.39.5