79,6 → 79,14 |
continue; |
// if value differs from the sql value then update |
else{ |
#if attribute not set, we create it. |
if(!isset($old_val) && $sql_attr=='Filter-Id') |
{ |
$res = da_sql_query($link,$config,"UPDATE $table SET value = '$val' WHERE $query_key = '$login' AND attribute = '$sql_attr' AND value = '';"); |
if (!$res || !da_sql_affected_rows($link,$res,$config)) |
echo "<b>Change failed for attribute $key: " . da_sql_error($link,$config) . "</b><br>\n"; |
} |
|
if (isset($item_vals["$key"][$j]) && (isset($old_val) && $old_val !='') || $sql_attr=='Filter-Id'){ |
$old_val = $item_vals["$key"][$j]; |
$old_val = da_sql_escape_string($link, $old_val); |