From bc59c3bad7b21522da063269ebb39ee9c039dcf5 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Wed, 2 Oct 2019 20:33:54 +0900 Subject: [PATCH] Update database.php --- system/database.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/system/database.php b/system/database.php index e915337..9d495e0 100644 --- a/system/database.php +++ b/system/database.php @@ -327,12 +327,20 @@ if(!check_function_exists("get_bind_to_sql_insert")) { } } +// Deprecated: get_bind_to_sql_where($bind, $excludes) - lower than 1.6 +// Now: get_bind_to_sql_where($bind, $options) - 1.6 or above + if(!check_function_exists("get_bind_to_sql_where")) { // warning: variable k is not protected. do not use variable k and external variable without filter function get_bind_to_sql_where($bind, $options=array()) { $s3 = ""; $excludes = get_value_on_array("excludes", $options, array()); + // compatible version 1.5 + if(!array_key_equals("compatible", $options, "1.5")) { + // todo + } + if(is_array($bind)) { foreach($bind as $k=>$v) { if(!in_array($k, $excludes)) { @@ -398,7 +406,7 @@ if(!check_function_exists("get_bind_to_sql_where")) { if(!array_key_empty("sql_where", $options)) { $s3 .= sprintf(" %s", $options['sql_where']); } - + return $s3; } } @@ -536,8 +544,8 @@ if(!check_function_exists("get_bind_to_sql_select")) { } } -// removed: get_bind_to_sql_update($tablename, $bind, $filters, $options) (lower than 1.6) -// current: get_bind_to_sql_update($tablename, $bind, $options, $_options) (1.6 or above) +// Deprecated: get_bind_to_sql_update($tablename, $bind, $filters, $options) - lower than 1.6 +// Now: get_bind_to_sql_update($tablename, $bind, $options, $_options) - 1.6 or above if(!check_function_exists("get_bind_to_sql_update")) { function get_bind_to_sql_update($tablename, $bind, $options=array(), $_options=array()) {