Update database.php

This commit is contained in:
Namhyeon Go 2019-10-02 20:33:54 +09:00 committed by GitHub
parent b2041e776a
commit bc59c3bad7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)) {
@ -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()) {