Hi all,
I am trying to get this code to work.
$db_newip = "UPDATE ips SET ";
$db_newip = $db_newip." used='1' , ";
$db_newip = $db_newip." reg_no='".addslashes(stripslashes($reg_no))."' , ";
$db_newip = $db_newip." towerid='".addslashes(stripslashes($new_tower))."' ";
$db_newip = $db_newip." where (ip_address='$new_ips')";
$assignip = mysql_db_query($dbname,$db_newip);
$db_oldip = "UPDATE ips SET ";
$db_oldip = $db_oldip." used='0' , ";
$db_oldip = $db_oldip." reg_no='NULL' , ";
$db_oldip = $db_oldip." towerid='NULL' , ";
$db_oldip = $db_oldip." where (ip_address='$ip_address')";
$oldip = mysql_db_query($dbname,$db_oldip);
The code works for the $db_newip section. It updates the listing and changes the values as needed. However the second part is suppose to happen right after, $db_oldip, and it doesnt return a thing. I even echoed the string and nothing displays. I need it to update the 'ips' table to change used to 0 and reg_no and towerid to NULL.
I am probably missing something really silly here but cannot get it to work. Any thoughts.
Thanks in advance...