105,13 → 105,13 |
if (!$res || !da_sql_affected_rows($link,$res,$config)) |
echo "<b>Change failed for attribute $key: " . da_sql_error($link,$config) . "</b><br>\n"; |
} |
else{ |
else if (isset($item_vals["$key"][$j])) { |
// if value is empty, we delete this attribute |
$old_val = $item_vals["$key"][$j]; |
$old_val = da_sql_escape_string($link, $old_val); |
if(isset($old_val) && $old_val != '') |
$res = da_sql_query($link,$config,"DELETE FROM $table WHERE $query_key = '$login' AND attribute = '$sql_attr' AND value = '$old_val';"); |
} |
if(!empty($old_val)) |
$res = da_sql_query($link,$config,"DELETE FROM $table WHERE $query_key = '$login' AND attribute = '$sql_attr' AND value = '$old_val';"); |
} |
} |
} |
} |