From c15066639479a713a062b172cdff18d9a375c0a3 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Wed, 12 Jun 2019 21:05:57 +0900 Subject: [PATCH] Update database.php --- system/database.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/database.php b/system/database.php index 0a94ba5..711c6a3 100644 --- a/system/database.php +++ b/system/database.php @@ -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) {