Subversion Repositories ALCASAR

Rev

Rev 1852 | Rev 1882 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 1852 Rev 1879
Line 84... Line 84...
84
					$old_val = da_sql_escape_string($link, $old_val);
84
					$old_val = da_sql_escape_string($link, $old_val);
85
					$res = da_sql_query($link,$config,
85
					$res = da_sql_query($link,$config,
86
					"UPDATE $table SET value = '$val' WHERE $query_key = '$login' AND
86
					"UPDATE $table SET value = '$val' WHERE $query_key = '$login' AND
87
					attribute = '$sql_attr' AND value = '$old_val';");
87
					attribute = '$sql_attr' AND value = '$old_val';");
88
				}
88
				}
89
				else
89
				if(isset($val) && $val != ''){
90
					$res = da_sql_query($link,$config,
90
					$res = da_sql_query($link,$config,
91
					"INSERT INTO $table ($query_key,attribute,value $text2)
91
					"INSERT INTO $table ($query_key,attribute,value $text2)
92
					VALUES ('$login','$sql_attr','$val' $op_val2);");
92
					VALUES ('$login','$sql_attr','$val' $op_val2);");
93
				if (!$res || !da_sql_affected_rows($link,$res,$config))
93
				if (!$res || !da_sql_affected_rows($link,$res,$config))
94
					echo "<b>Change failed for attribute $key: " . da_sql_error($link,$config) . "</b><br>\n";
94
					echo "<b>Change failed for attribute $key: " . da_sql_error($link,$config) . "</b><br>\n";
-
 
95
					}
95
			}
96
			}
96
		}
97
		}
97
	}
98
	}
98
}
99
}
99
else
100
else