2008-07-29 Evi Vanoost <vanooste@rcbi.rochester.edu>

* functions_db.php: Quick fix. Used wrong function.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@982 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
guruevi 2008-07-29 17:10:28 +00:00
parent 00e67406ec
commit 9d84ead204
1 changed files with 2 additions and 3 deletions

View File

@ -1136,7 +1136,7 @@ function agent_add_address ($id_agent, $ip_address) {
$sql = sprintf ("SELECT COUNT(`ip`) FROM taddress_agent, taddress
WHERE taddress_agent.id_a = taddress.id_a
AND ip = '%s' AND id_agent = %d",$ip_address,$id_agent);
$current_address = get_db_row_sql ($sql);
$current_address = get_db_sql ($sql);
if ($current_address > 0)
return;
@ -1175,8 +1175,7 @@ function agent_delete_address ($id_agent, $ip_address) {
if (give_agent_address ($id_agent) == $ip_address) {
$new_ip = give_agent_address_from_list ($id_agent);
// Change main address in agent to whis one
$query = sprintf ("UPDATE tagente (direccion) VALUES
('%s') WHERE id_agente = %d ",$new_ip,$id_agent);
$query = sprintf ("UPDATE tagente SET `direccion` = '%s' WHERE id_agente = %d",$new_ip,$id_agent);
process_sql ($query);
}
}