From 8b84c25809b77d7baf10edbc0d9b751c4dc551be Mon Sep 17 00:00:00 2001 From: rangi Date: Mon, 15 Mar 2004 20:24:13 +0000 Subject: [PATCH] Fixing some bogus sql --- C4/Maintainance.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/C4/Maintainance.pm b/C4/Maintainance.pm index 072cfc1c6c..a2d555644c 100644 --- a/C4/Maintainance.pm +++ b/C4/Maintainance.pm @@ -79,8 +79,8 @@ C<$n> is 0, it will return all matching subjects. sub listsubjects { my ($sub,$num,$offset)=@_; my $dbh = C4::Context->dbh; - my $query="Select * from bibliosubject where subject like '?%' group by subject"; - my @bind = ($sub); + my $query="Select * from bibliosubject where subject like ? group by subject"; + my @bind = ("$sub%"); # FIXME - Make $num and $offset optional. # If $num was given, make sure $offset was, too. if ($num != 0){ @@ -156,8 +156,8 @@ is the number of elements in C<$results>. sub deletedbib{ my ($title)=@_; my $dbh = C4::Context->dbh; - my $sth=$dbh->prepare("Select * from deletedbiblio where title like '?%' order by title"); - $sth->execute($title); + my $sth=$dbh->prepare("Select * from deletedbiblio where title like ? order by title"); + $sth->execute("$title%"); my @results; my $i=0; while (my $data=$sth->fetchrow_hashref){ -- 2.39.5