Some more replaced old database functions

This commit is contained in:
Michael 2017-11-22 07:21:19 +00:00
parent 663c38afed
commit 7c3fd2adb5
10 changed files with 65 additions and 107 deletions

View file

@ -1016,16 +1016,12 @@ class dba {
public static function update($table, $fields, $condition, $old_fields = array()) {
$table = self::escape($table);
if (count($condition) > 0) {
$array_element = each($condition);
$array_key = $array_element['key'];
if (is_int($array_key)) {
$condition_string = " WHERE ".array_shift($condition);
} else {
$condition_string = " WHERE `".implode("` = ? AND `", array_keys($condition))."` = ?";
}
$array_element = each($condition);
$array_key = $array_element['key'];
if (is_int($array_key)) {
$condition_string = " WHERE ".array_shift($condition);
} else {
$condition_string = "";
$condition_string = " WHERE `".implode("` = ? AND `", array_keys($condition))."` = ?";
}
if (is_bool($old_fields)) {