Update database.php

This commit is contained in:
Namhyeon Go 2019-06-12 21:06:52 +09:00 committed by GitHub
parent c150666394
commit 230600c87d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -313,9 +313,11 @@ if(!check_function_exists("get_bind_to_sql_where")) {
function get_bind_to_sql_where($bind, $excludes=array()) {
$sql_where = "";
foreach($bind as $k=>$v) {
if(!in_array($k, $excludes)) {
$sql_where .= sprintf(" and %s = :%s", $k, $k);
if(is_array($bind)) {
foreach($bind as $k=>$v) {
if(!in_array($k, $excludes)) {
$sql_where .= sprintf(" and %s = :%s", $k, $k);
}
}
}