|
Lines 76-83
sub search {
Link Here
|
| 76 |
$term .= '%' # end with anything |
76 |
$term .= '%' # end with anything |
| 77 |
if $term !~ /%$/; |
77 |
if $term !~ /%$/; |
| 78 |
$term = "%$term" # begin with anythin unless start_with |
78 |
$term = "%$term" # begin with anythin unless start_with |
| 79 |
if $term !~ /^%/ |
79 |
if (defined $searchtype) && $searchtype eq "contain" |
| 80 |
and $searchtype eq "contain"; |
80 |
&& $term !~ /^%/; |
| 81 |
my @where_strs_or; |
81 |
my @where_strs_or; |
| 82 |
for my $searchfield ( split /,/, $searchfields->{$searchfieldstype} ) { |
82 |
for my $searchfield ( split /,/, $searchfields->{$searchfieldstype} ) { |
| 83 |
push @where_strs_or, "borrowers." . $dbh->quote_identifier($searchfield) . " LIKE ?"; |
83 |
push @where_strs_or, "borrowers." . $dbh->quote_identifier($searchfield) . " LIKE ?"; |
| 84 |
- |
|
|