Gossamer Forum
Home : Products : DBMan : Customization :

autodelete mod

Quote Reply
autodelete mod
I am about to install the autodelete mod. I have multiple databases on my server, all using db.cgi and auth.pl. As long as none of them have the same fieldname and position for the DateAdded field, is it safe to use this mod without worrying about records from other database being deleted?

I don't know much perl, and the

my $date_field = 2 in the db.cgi is what is scaring me.

thanks!

Quote Reply
Re: autodelete mod In reply to
If you follow the instructions for autodelete for Mulitiple Databases you should be just fine.

You will define the necessary field names by name so it will not make a difference if the fields are not the same in each database.

You define your fields in your format.pl file (if used) and specify for each database the field numbers such as:

@autodelete[#]= 'remove_by field number|date_added field number|database name'; ## delete using date added
OR
@autodelete[#]= 'remove_by field number|expires field number|database name'; ### delete using expired field

Example:

@autodelete[0] = '5|6|this.db';
@autodelete[1] = '8|3|that.db';
@autodelete[2] = '10|0|theother.db';

as you can see the fields are a different positions within each database.

Like all mods, it's a good idea to use a backup copy to test out a new mod to be sure everything is working as expected if your database is already up and running.

Hope this helps

Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: autodelete mod In reply to
Thanks Lois. After looking at that, I opted for making a new cgi and auth.pl for this particular database and using the autodelete mod at http://webmagic.hypermart.net/dbman/autodel1.txt

I finished installing everything, and set my $remove to 1.

Then, I added some records with yesterday's date, and they haven't been deleted, even after logging in as admin.

I used the same date format the comes up when it is autogenerated... any ideas what the problem is?

Thanks!

Quote Reply
Re: autodelete mod In reply to
The only thing I can suggest is to make sure you followed all the instructions, and perhaps set the date to several days ahead of time just for testing purposes.

Sorry I could not be of more help.



Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: autodelete mod In reply to
I went there this morning, and they're gone! I don't know why, but I'm glad it worked.

Thanks for your help, Lois.