Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Re: [timbo] add multiple - error messages

Quote Reply
Re: [timbo] add multiple - error messages In reply to
Hi,

You need to custom the add_multi_records subroutine a little bit like:

....
foreach my $rec_num ( 1..$rows ) {
# The hash ref, we need, to modify a record.
my $hash = {};

# For through the column names to build our modification hash
foreach my $column ( @columns ) {
$hash->{$column} = $self->{cgi}->{"$rec_num-$column"} if exists $self->{cgi}->{"$rec_num-$column"};
}
next if ($self->{cgi}->{db} eq 'Company_Product' and (!$hash->{category_code} or !$hash->{product_code}));
.....
}

Hope that helps.

TheStone.

B.

Last edited by:

TheStone: Nov 14, 2003, 10:03 AM
Subject Author Views Date
Thread add multiple - error messages timbo 3818 Nov 13, 2003, 10:31 AM
Thread Re: [timbo] add multiple - error messages
604 3704 Nov 14, 2003, 10:01 AM
Thread Re: [TheStone] add multiple - error messages
timbo 3695 Nov 14, 2003, 10:12 AM
Post Re: [timbo] add multiple - error messages
timbo 3690 Nov 14, 2003, 11:35 PM