From fdbba15fbd408871c8171e65c387858358ad9442 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Tue, 1 Oct 2019 18:30:50 +0900 Subject: [PATCH] Update database.php --- system/database.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/system/database.php b/system/database.php index 75df879..128279e 100644 --- a/system/database.php +++ b/system/database.php @@ -531,14 +531,14 @@ 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) (1.6 or above) +// current: 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()) { + function get_bind_to_sql_update($tablename, $bind, $options=array(), $_options=array()) { $excludes = array(); $bind_wheres = array(); - // set keys + // setkeys if(!array_key_empty("setkeys", $options)) { $setkeys = $options['setkeys']; foreach($bind as $k=>$v) { @@ -548,6 +548,11 @@ if(!check_function_exists("get_bind_to_sql_update")) { } } } + + // compatible version 1.5 + if(!array_key_equals("compatible", $options, "1.5")) { + // todo + } // make sql 'where' clause $sql_where = get_db_binded_sql(get_bind_to_sql_where($bind_wheres), $bind_wheres); @@ -565,6 +570,8 @@ if(!check_function_exists("get_bind_to_sql_update")) { } } +function + if(!check_function_exists("get_bind_to_sql_delete")) { function get_bind_to_sql_delete($tablename, $bind, $options=array()) { $sql = "delete from %s where 1" . get_bind_to_sql_where($bind);