Update database.php

This commit is contained in:
Namhyeon Go 2019-06-12 21:05:57 +09:00 committed by GitHub
parent 75e3402971
commit c150666394
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -405,11 +405,11 @@ if(!check_function_exists("get_bind_to_sql_select")) {
if(check_array_length($opts[1][2], 0) > 0) {
$s3a = array();
foreach($opts[1][2] as $word) {
$s3a[] = sprintf("%s like '%s'", $s1a[$opts[1][1]], "%{$word}%");
$s3a[] = sprintf("%s like '%s'", get_value_in_array($opts[1][1], $s1a, $opts[1][1]), "%{$word}%");
}
$s3 .= sprintf(" %s (%s)", $opts[0], implode(" and ", $s3a));
} else {
$s3 .= sprintf(" %s (%s like %s)", $opts[0], $s1a[$opts[1][1]], "'%{$opts[1][2]}%'");
$s3 .= sprintf(" %s (%s like %s)", $opts[0], get_value_in_array($opts[1][1], $s1a, $opts[1][1]), "'%{$opts[1][2]}%'");
}
} elseif($opts[1][0] == "in") {
if(check_array_length($opts[1][2], 0) > 0) {