From 032ac3fa54eb7ad99d83c91098db6bce55e1fa42 Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Tue, 6 Oct 2009 11:56:00 +0200 Subject: [PATCH] Improving Research on Bookseller Can search now on any word --- C4/Bookseller.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Bookseller.pm b/C4/Bookseller.pm index 0244bc349e..0153f2b10b 100644 --- a/C4/Bookseller.pm +++ b/C4/Bookseller.pm @@ -69,9 +69,9 @@ aqbooksellers table in the Koha database. sub GetBookSeller($) { my ($searchstring) = @_; my $dbh = C4::Context->dbh; - my $query = "SELECT * FROM aqbooksellers WHERE name LIKE ?"; + my $query = "SELECT * FROM aqbooksellers WHERE name LIKE ? "; my $sth =$dbh->prepare($query); - $sth->execute( "$searchstring%" ); + $sth->execute( "%$searchstring%"); my @results; # count how many baskets this bookseller has. # if it has none, the bookseller can be deleted -- 2.39.5