function db_array_to_update_sqladd($arr) {
$s = '';
foreach ($data as $k => $v) {
$op = substr($k, -1);
if ($op == '+' || $op == '-') {
$k = substr($k, 0, -1);
$v = (is_int($v) || is_float($v)) ? $v : "'" . addslashes($v) . "'";
$s .= "`$k`=`$k`$op$v,";
} else if ($op == '=') {
$k = substr($k, 0, -1);
$s .= "`$k`=`$v`,";
} else {
$v = (is_int($v) || is_float($v)) ? $v : "'" . addslashes($v) . "'";
$s .= "`$k`=$v,";
}
}
return substr($s, 0, -1);
}