Update database.php
This commit is contained in:
parent
5cf9234791
commit
c446db7ebb
|
@ -344,7 +344,7 @@ if(!check_function_exists("get_bind_to_sql_insert")) {
|
||||||
// make statements
|
// make statements
|
||||||
if($num_duplicates > 0) {
|
if($num_duplicates > 0) {
|
||||||
$sql = get_bind_to_sql_update($tablename, $bind, array(
|
$sql = get_bind_to_sql_update($tablename, $bind, array(
|
||||||
"setkeys" => array_keys($_bind_F)
|
"setkeys" => array_keys($_bind_T)
|
||||||
), $options);
|
), $options);
|
||||||
} else {
|
} else {
|
||||||
$bind_keys = array_keys($bind);
|
$bind_keys = array_keys($bind);
|
||||||
|
@ -678,7 +678,7 @@ if(!check_function_exists("get_bind_to_sql_update")) {
|
||||||
// bind `where` clause
|
// bind `where` clause
|
||||||
$_bind_T = array();
|
$_bind_T = array();
|
||||||
$_bind_F = array();
|
$_bind_F = array();
|
||||||
|
|
||||||
// setkeys
|
// setkeys
|
||||||
$setkeys = get_array(get_value_in_array("setkeys", $options, false));
|
$setkeys = get_array(get_value_in_array("setkeys", $options, false));
|
||||||
foreach($bind as $k=>$v) {
|
foreach($bind as $k=>$v) {
|
||||||
|
@ -697,9 +697,9 @@ if(!check_function_exists("get_bind_to_sql_update")) {
|
||||||
|
|
||||||
// s3: make 'where' clause
|
// s3: make 'where' clause
|
||||||
$s3 = get_bind_to_sql_where($_bind_T, $options);
|
$s3 = get_bind_to_sql_where($_bind_T, $options);
|
||||||
|
|
||||||
// make completed statements
|
// make completed statements
|
||||||
$sql = get_db_binded_sql(sprintf("update %s set %s where %s", $s1, $s2, $s3), $bind);
|
$sql = get_db_binded_sql(sprintf($sql, $s1, $s2, $s3), $bind);
|
||||||
|
|
||||||
return $sql;
|
return $sql;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user