From 8e8455789f65ea77246d0eb542ff377bc58d7296 Mon Sep 17 00:00:00 2001 From: rangi Date: Wed, 20 Feb 2002 21:05:19 +0000 Subject: [PATCH] Making a "fix" to normal title search --- C4/Search.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index 43c3130472..f5cd08e875 100755 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -674,10 +674,11 @@ sub CatSearch { my @key=split(' ',$search->{'title'}); my $count=@key; my $i=1; - $query="select * from biblio,bibliosubtitle,biblioitems + $query="select * from biblio,biblioitems + left join bibliosubtitle on + biblio.biblionumber=bibliosubtitle.biblionumber where - (biblio.biblionumber=bibliosubtitle.biblionumber and - biblioitems.biblionumber=biblio.biblionumber) and + biblioitems.biblionumber=biblio.biblionumber and (((title like '$key[0]%' or title like '% $key[0]%' or title like '% $key[0]')"; while ($i<$count){ $query=$query." and (title like '$key[$i]%' or title like '% $key[$i]%' or title like '% $key[$i]')"; @@ -795,7 +796,7 @@ sub CatSearch { $sth1->finish; } } -#print $query; +print $query; if ($type ne 'precise' && $type ne 'subject'){ if ($search->{'author'} ne ''){ $query=$query." order by biblio.author,title"; -- 2.39.5