Update database.php

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

View File

@ -328,17 +328,17 @@ 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
// Now: get_bind_to_sql_where($bind, $options, $_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()) {
function get_bind_to_sql_where($bind, $options=array(), $_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(array_key_equals("compatible", $_options, "1.5")) {
$excludes = $options;
}
if(is_array($bind)) {
@ -564,8 +564,9 @@ if(!check_function_exists("get_bind_to_sql_update")) {
}
// compatible version 1.5
if(!array_key_equals("compatible", $options, "1.5")) {
// todo
if(array_key_equals("compatible", $_options, "1.5")) {
$filter = $options;
$options = $_options;
}
// make sql 'where' clause