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.
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.