X-Git-Url: http://git.pippins.net/embedvideo/.git/static/git-logo.png?a=blobdiff_plain;f=import_ward_data;h=405784a97f8dd379f05159485e27625d24c59fdf;hb=3ceab85dc8b7434df82b8a42d70a1ed491409716;hp=5d9b7546b37f2f6d6988ddc775aff87230da0306;hpb=7a92fd777c036652da0b72138ca1cf32da9a9dd8;p=eq%2F.git diff --git a/import_ward_data b/import_ward_data index 5d9b754..405784a 100755 --- a/import_ward_data +++ b/import_ward_data @@ -387,7 +387,7 @@ sub update_eq_family_table if($rows == 0) { # No existing records found for this family, make a new entry print " Adding new Family: $family_name\n"; - $sth = $dbh->prepare("insert into eq_family values (NULL,$id,'$family_name','$name_id','0','0',1,1,'')"); + $sth = $dbh->prepare("insert into eq_family values (NULL,$id,'$family_name','$name_id','0','0','1','',1)"); $sth->execute or die "-E- DB error: $DBI::errstr\n"; } elsif($rows == 1) { # An existing record was found for this family, update it @@ -522,9 +522,11 @@ sub update_eq_parent_table $sth->execute or die "-E- DB error: $DBI::errstr\n"; $sth = $dbh->prepare("update eq_parent set indiv_id='$id' where name='$parent_name'"); $sth->execute or die "-E- DB error: $DBI::errstr\n"; - } else { + } elsif($rows > 1) { # More than one record was found. Error! This shouldn't happen. - print " -E- More than one record found with same parent name: $parent_name\n"; + print " -E- More than one record found with same parent name: $parent_name with hofh_id: $hofh_id\n"; + } else { + print " -E- Unable to find a family to attach this parent to: $parent_name with hofh_id: $hofh_id\n"; } $sth->finish(); }