Making a "fix" to normal title search

This commit is contained in:
rangi 2002-02-20 21:05:19 +00:00
parent bbb2008246
commit 8e8455789f
1 changed files with 5 additions and 4 deletions

View File

@ -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";