Update database.php
This commit is contained in:
parent
f33bf7da19
commit
ce7cc612ac
|
@ -301,23 +301,25 @@ if(!check_function_exists("get_bind_to_sql_insert")) {
|
||||||
$num_duplicates = 0;
|
$num_duplicates = 0;
|
||||||
|
|
||||||
// do process
|
// do process
|
||||||
$_bind_K = array();
|
if(count($setduplicate) > 0) {
|
||||||
$_bind_V = array();
|
$_bind_K = array();
|
||||||
foreach($bind as $k=>$v) {
|
$_bind_V = array();
|
||||||
if(in_array($k, $setduplicate)) {
|
foreach($bind as $k=>$v) {
|
||||||
$_bind_K[$k] = $v;
|
if(in_array($k, $setduplicate)) {
|
||||||
} else {
|
$_bind_K[$k] = $v;
|
||||||
$_bind_V[$k] = $v;
|
} else {
|
||||||
|
$_bind_V[$k] = $v;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$_sql = get_bind_to_sql_select($tablename, $_bind_K, array(
|
||||||
|
"getcount" => true,
|
||||||
|
"setwheres" => $setnotwhere
|
||||||
|
));
|
||||||
|
write_common_log($_sql, "BBBBBB");
|
||||||
|
$_rows = exec_db_fetch_all($_sql, $_bind_K);
|
||||||
|
foreach($_rows as $_row) {
|
||||||
|
$num_duplicates += intval($_row['value']);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
$_sql = get_bind_to_sql_select($tablename, $_bind_K, array(
|
|
||||||
"getcount" => true,
|
|
||||||
"setwheres" => $setnotwhere
|
|
||||||
));
|
|
||||||
write_common_log($_sql, "AAAAAAAA");
|
|
||||||
$_rows = exec_db_fetch_all($_sql, $_bind_K);
|
|
||||||
foreach($_rows as $_row) {
|
|
||||||
$num_duplicates += intval($_row['value']);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// make statements
|
// make statements
|
||||||
|
|
Loading…
Reference in New Issue
Block a user