From 4a98096d23ed867d2d45a4f33d3a43a5ed087420 Mon Sep 17 00:00:00 2001 From: tipaul Date: Mon, 24 Nov 2003 16:24:24 +0000 Subject: [PATCH] execute($var) with ? bugfix --- C4/Catalogue.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/C4/Catalogue.pm b/C4/Catalogue.pm index a0bb632d89..1e2d1b6a41 100644 --- a/C4/Catalogue.pm +++ b/C4/Catalogue.pm @@ -440,10 +440,9 @@ tables of the Koha database. sub getorder{ my ($bi,$bib)=@_; my $dbh = C4::Context->dbh; - my $query="Select ordernumber from aqorders where biblionumber=$bib and - biblioitemnumber='$bi'"; + my $query="Select ordernumber from aqorders where biblionumber=? and biblioitemnumber=?"; my $sth=$dbh->prepare($query); - $sth->execute; + $sth->execute($bib,$bi); # FIXME - Use fetchrow_array(), since we're only interested in the one # value. my $ordnum=$sth->fetchrow_hashref; -- 2.39.5