$sth = $dbh->prepare("INSERT INTO tblCustomer (BranchID, LastName, FirstName, Street, Town, County, PostCode, PhoneNumber, Email, FAX, Note) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); "); $sth->execute( 'L1', $secondname, $firstname, $order->{addresses}->{delivery}->{street}, $order->{addresses}->{delivery}->{city}, $order->{addresses}->{delivery}->{county}, $order->{addresses}->{delivery}->{postcode}, undef, 'rjberry@gmail.com', undef, 'Order ID #' . $id ) or die "Could not update DB!";