- # An existing record was found for this aaronic, update it if it is valid
- if($data[0]->{valid} == 1) {
- print " Updating existing aaronic: $aaronic_name\n";
- $sth = $dbh->prepare("update eq_aaronic set phone='$phone' where name='$aaronic_name'");
- $sth->execute or die "-E- DB error: $DBI::errstr\n";
- }
+ # An existing record was found for this aaronic, update it, mark it valid!
+ print " Updating existing aaronic: $aaronic_name\n";
+ $sth = $dbh->prepare("update eq_aaronic set phone='$phone' where name='$aaronic_name'");
+ $sth->execute or die "-E- DB error: $DBI::errstr\n";
+ $sth = $dbh->prepare("update eq_aaronic set valid=1 where name='$aaronic_name'");
+ $sth->execute or die "-E- DB error: $DBI::errstr\n";