Update database.php

This commit is contained in:
Namhyeon Go 2019-10-02 20:47:53 +09:00 committed by GitHub
parent 099f65e210
commit e60f487117
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -352,6 +352,7 @@ if(!check_function_exists("get_bind_to_sql_where")) {
if(!array_keys_empty(array("settimefield", "setminutes"), $options)) {
$s3 .= get_bind_to_sql_past_minutes($options['settimefield'], $options['setminutes']);
}
if(!array_key_empty("setwheres", $options)) {
if(is_array($options['setwheres'])) {
foreach($options['setwheres'] as $opts) {
@ -360,7 +361,12 @@ if(!check_function_exists("get_bind_to_sql_where")) {
} elseif(check_array_length($opts, 3) == 0 && is_array($opts[2])) {
$s3 .= sprintf(" %s (%s)", $opts[0], get_db_binded_sql($opts[1], $opts[2]));
} elseif(check_array_length($opts, 2) == 0 && is_array($opts[1])) {
if($opts[1][0] == "like") {
if(is_array($opts[1][0])) {
// recursive
$s3 .= sprintf(" %s (%s)", $opts[0], get_bind_to_sql_where(false, array(
"setwheres" => $opts[1][0]
));
} elseif($opts[1][0] == "like") {
if(check_array_length($opts[1][2], 0) > 0) {
$s3a = array();
foreach($opts[1][2] as $word) {