Browse Source

getting author searches sorted by author

master
chris 25 years ago
parent
commit
f4b2fd4331
  1. 6
      C4/Search.pm

6
C4/Search.pm

@ -243,7 +243,11 @@ sub CatSearch {
$sth->finish; $sth->finish;
$query=~ s/count\(\*\)/\*/g; $query=~ s/count\(\*\)/\*/g;
if ($type ne 'precise' && $type ne 'subject'){ if ($type ne 'precise' && $type ne 'subject'){
$query=$query." order by title limit $offset,$num"; if ($search->{'author'} ne ''){
$query=$query." order by author,title limit $offset,$num";
} else {
$query=$query." order by title limit $offset,$num";
}
} else { } else {
if ($type eq 'subject'){ if ($type eq 'subject'){
$query=$query." order by subject limit $offset,$num"; $query=$query." order by subject limit $offset,$num";

Loading…
Cancel
Save