Update database.php

This commit is contained in:
Namhyeon Go 2019-09-25 17:05:36 +09:00 committed by GitHub
parent 9cb1bd6638
commit cd1ae416f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -302,11 +302,12 @@ if(!check_function_exists("get_bind_to_sql_insert")) {
function get_bind_to_sql_insert($tablename, $bind, $options=array()) { function get_bind_to_sql_insert($tablename, $bind, $options=array()) {
// check ignore // check ignore
if(!array_key_empty("ignore", $options)) { if(!array_key_empty("ignore", $options)) {
$row = exec_db_fetch(get_bind_to_sql_select($tablename, false, array( $cnt = intval(
"getcnt" => true, get_value_in_array("cnt", exec_db_fetch(get_bind_to_sql_select($tablename, false, array(
"setwheres" => $options['ignore'] "getcnt" => true,
)), false); "setwheres" => $options['ignore']
$cnt = $row['cnt']; )), false), 0)
);
if($cnt > 0) { if($cnt > 0) {
return "select " . $cnt; return "select " . $cnt;
} }