Not so great after all..
It do not goes together with the 'maximum adding records' modification, I've tried to implant it elsewhere in the sub 'validate records', but without succes. I post a part of my sub 'validate_records' here:
Code:
my ($col, @input_err, $errstr, $err, $line, @lines, @data);
if ($in{'add_record'}) { # don't need to worry about duplicate key if modifying
open (DB, "<$db_file_name") or &cgierr("error in validate_records. unable to open db file: $db_file_name.\nReason: $!");
if ($db_use_flock) { flock(DB, 1); }
LINE: while (<DB> ) {
(/^#/) and next LINE;
(/^\s*$/) and next LINE;
$line = $_;
chomp ($line);
@data = &split_decode($line);
if ($data[$db_key_pos] eq $in{$db_key}) {
return "duplicate key error";
}
if ($data[$auth_user_field] eq $db_userid) {
++$count;
}
}
close DB;
if ($count >= $db_maximum_records) {
return "U heeft het maximum aantal records voor elke gebruiker reeds toegevoegd";
}
}
foreach $col (@db_cols) {
(rest of code)
When I use both mod's, I get an error, when the record is not a duplicate, the errormessage is, that "it could not find the label for 'NEXT line'".
Is there a way, to fix them both???
[This message has been edited by mart (edited August 18, 1999).]