From 6a9584871e57a3a5136cb88b4f2bcbaae5bba007 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Tue, 3 Jul 2018 10:41:29 +0900 Subject: [PATCH] Update database.php --- system/database.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/system/database.php b/system/database.php index 82dc623..0700d43 100644 --- a/system/database.php +++ b/system/database.php @@ -315,7 +315,11 @@ if(!function_exists("get_bind_to_sql_select")) { if(!array_key_empty("setwheres", $options)) { if(is_array($options['setwheres'])) { foreach($options['setwheres'] as $opts) { - $s3 .= check_is_string_not_array($opts) ? sprintf(" and (%s)", $opts) : ""; + if(check_is_string_not_array($opts)) { + $s3 .= sprintf(" and (%s)", $opts); + } elseif(count($opts) == 2) { + $s3 .= sprintf(" %s (%s)", $opts[0], $opts[1]); + } } } }