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