From be8ecf2d5e44fffb1cbe08ce4996ca889a523edb Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Mon, 20 May 2019 15:27:30 +0900 Subject: [PATCH] Update database.php --- system/database.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/system/database.php b/system/database.php index 09d7ef4..816742d 100644 --- a/system/database.php +++ b/system/database.php @@ -449,9 +449,18 @@ if(!check_function_exists("get_bind_to_sql_select")) { $s3 .= sprintf(" %s (%s in ('%s'))", $opts[0], $s1a[$opts[1][1]], implode("', '", $opts[1][2])); } } else { - $ssts = array("eq" => "=", "lt" => "<", "lte" => "<=", "gt" => ">", "gte" => ">="); - $opcode = get_value_in_array($opts[1][0], $ssts, $ssts['eq']); - $s3 .= sprintf(" %s (%s %s '%s')", $opts[0], $opts[1][1], $opcode, $opts[1][2]); + $ssts = array( + "eq" => "=", + "lt" => "<", + "lte" => "<=", + "gt" => ">", + "gte" => ">=", + "not" => "<>" + ); + $opcode = get_value_in_array($opts[1][0], $ssts, $opts[1][0]); + if(!empty($opcode)) { + $s3 .= sprintf(" %s (%s %s '%s')", $opts[0], $opts[1][1], $opcode, $opts[1][2]); + } } } elseif(check_array_length($opts, 2) == 0) { $s3 .= sprintf(" %s (%s)", $opts[0], $opts[1]);