Gossamer Forum
Home : Products : DBMan : Customization :

How do I email all related data on add_success?

Quote Reply
How do I email all related data on add_success?
I have an add_success email confirmation that also includes some related data. Problem is that it only sends the first related data row and not the others. Here is the code I'm using to make the switch:-

$rec{'UserID'} =~ s/<?.B>//g;

undef %in;
$in{'UserID'} = $rec{'UserID'};
$in{'mh'} = 100;

my ($status2,@hits2) = &query("view");

if ($status2 eq "ok") {
my ($numhits2) = ($#hits2+1) / ($#db_cols+1);
for (0 .. $numhits2 - 1) {
%rec3 = &array_to_hash($_, @hits2);
}

}
%rec3 = &get_record($rec{'UserID'});

and then my print mail has:-

print MAIL "Contract info as follows:-\n\n";
foreach $col (@db_cols) {
print MAIL "$col -- $rec3{$col}\n";

}
close (MAIL);

Which is ok but I only get the one related item (the first one sorted in counter ID order) when I really need to email all related records.

Any ideas?
TIA
Rob


Subject Author Views Date
Thread How do I email all related data on add_success? rcrossland 1041 Nov 24, 2000, 12:57 PM
Post Re: How do I email all related data on add_success?
rcrossland 966 Nov 27, 2000, 12:25 PM