diff --git a/C4/Search.pm b/C4/Search.pm index d826013434..2a91b3ccfc 100755 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1760,8 +1760,8 @@ sub BornameSearch { or othernames like \"$data[0]%\" or othernames like \"% $data[0]%\") "; for (my $i=1;$i<$count;$i++){ - $query=$query." and (surname like \"$data[$i]%\" or surname like \"% $data[$i]%\" - or firstname like \"$data[$i]%\" or firstname like \"% $data[$i]%\" + $query=$query." and (". + " firstname like \"$data[$i]%\" or firstname like \"% $data[$i]%\" or othernames like \"$data[$i]%\" or othernames like \"% $data[$i]%\")"; # FIXME - .= <