Actual email address add code; tests stay same.

This commit is contained in:
Bradley M. Kuhn 2015-12-11 18:15:31 -08:00
parent b1436e037e
commit 5b07fe6af9

View file

@ -177,6 +177,15 @@ sub addEmailAddress($$$$) {
my $addressTypeId = $self->addAddressType($emailAddressType);
my $sth = $self->dbh->prepare("INSERT INTO email_address(email_address, type_id, date_encountered)" .
"VALUES( ?, ?, date('now'))");
$self->dbh->begin_work();
$sth->execute($emailAddress, $addressTypeId);
my $addressId = $self->dbh->last_insert_id("","","","");
$sth->finish();
$self->dbh->commit();
return $addressId;
}
######################################################################