Hi Jean,
This particular database has a heap of different modifications and plugins and by the time you try and work out what I have done I think it would easier if you could just give me the few lines of code that can be used to check for errors. It should be something like the following (which I took from GT/SQL/Table.pm). How can I modify this to work within the blue area of my sub (just above my last post).
Thanks
Simon.
# Clear errors.
$self->{_error} = [];
foreach my $col (keys %$c) {
next if ($col eq $ai);
if ($c->{$col}->{not_null} and (!defined $input->{$col} or $input->{$col} !~ /\S/)) {
$self->error ('NOTNULL', 'WARN', $c->{$col}->{form_display} || $col);
$err = 1;
}
}
if ($err) {
if (ref $self->{_error} and @{$self->{_error}}) {
$GT::SQL::error = join "\n", @{$self->{_error}};
return;
}
}
This particular database has a heap of different modifications and plugins and by the time you try and work out what I have done I think it would easier if you could just give me the few lines of code that can be used to check for errors. It should be something like the following (which I took from GT/SQL/Table.pm). How can I modify this to work within the blue area of my sub (just above my last post).
Thanks
Simon.
# Clear errors.
$self->{_error} = [];
foreach my $col (keys %$c) {
next if ($col eq $ai);
if ($c->{$col}->{not_null} and (!defined $input->{$col} or $input->{$col} !~ /\S/)) {
$self->error ('NOTNULL', 'WARN', $c->{$col}->{form_display} || $col);
$err = 1;
}
}
if ($err) {
if (ref $self->{_error} and @{$self->{_error}}) {
$GT::SQL::error = join "\n", @{$self->{_error}};
return;
}
}