Only add % to value if % is not present.

This commit is contained in:
externo6 2019-10-16 10:10:23 +01:00
parent 4b71bc75ea
commit e232c22b3d
1 changed files with 1 additions and 1 deletions

View File

@ -239,7 +239,7 @@ sub Sql {
if ( $term->{op} eq 'LIKE'
|| $term->{op} eq 'NOT LIKE'
) {
$temp_value = '%'.$temp_value.'%';
$temp_value = '%'.$temp_value.'%' if $temp_value !~ /%/;
}
$value = "'$temp_value'";
} elsif ( $term->{attr} eq 'DateTime' or $term->{attr} eq 'StartDateTime' or $term->{attr} eq 'EndDateTime' ) {