Gossamer Forum
Home : Products : DBMan : Customization :

Limit records problem

Quote Reply
Limit records problem
Hi,

I am using the limit-records mod and the autodelete mod.
Now I am running into 2 problems:
- When I allow a user to add 5 records, dbman allows this user to add 3 records. Where do those missing 2 go? After I increase the limit of records to 4, the user is allowed to add one. Strange?
- When a record is autodeleted, the users account (the maximum of records) is not updated.

My db can be fount on http://212.204.215.4/test.html

Any help is appreciated!

Peter


Quote Reply
Re: Limit records problem In reply to
In Reply To:
When a record is autodeleted, the users account (the maximum of records) is not updated.
The mod was not designed to work with the autodelete mod. You'll need to make changes in the other mod. I'm not very familiar with it, since I haven't looked at it in a very long time.

As to your other problem, I would need to look at your db.cgi file. Please copy the file to a web-accessible directory (one where you would place .html files) and rename it to db_cgi.txt. Then come back here and tell me where I can see it.



JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Limit records problem In reply to
Hi JPD,

My db.cgi can be found in: http://212.204.215.4/jpd/db_cgi.txt

I also added my cfg-file: http://212.204.215.4/jpd/lmcfg.cfg



I started all over, and added just the limit-mod to db.cgi, without the autodeletemod. Same result.....
What happens is this:
if a user's limit is 5, 3 records can be added.
If the limit is 7, 4 records can be addded
Limit 10: 5 records
Limt 11: 6 records etc.

Crazy Crazy?

Peter


Quote Reply
Re: Limit records problem In reply to
You must have an earlier version of this.

In sub validate_record, delete

Code:
unless ($per_admin) {
if ($data[$auth_user_field] eq $db_userid) {
++$user_count;
}
}
and

Code:
if ($user_count >= $per_add) {
return "U heeft het maximum aantal records dat u kunt invoeren bereikt. Wis eerst records of wacht op de automatische verwijdering na de vervaldatum. ";
}


JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Limit records problem In reply to
Wow! Thanks, JPD!

I wonder where I got the earlier version, but who cares! It works.

Thanks again,
Peter