Home : Products : Gossamer Links : Development, Plugins and Globals :

Products: Gossamer Links: Development, Plugins and Globals: Re: [Andy] Auto delete link within certain days: Edit Log

Here is the list of edits for this post
Re: [Andy] Auto delete link within certain days
First I create a: Created column in Links

Then edit Add.cgi and make Created = NOW() time. (somewhat like the timestamp.)

I check the link, it shows the 14 digit timestamp.

I want to delete ANY link that is older than 2 days or whatever day by changing the "172800". I tested with "time() - 1" second to instant delete but it does not working.

Links::init_date();
my $delete_by = GT::Date::date_get ( time() - 172800 ); # 2 days old
my $link_db = $DB->table ('Links');
$link_db->delete ( GT::SQL::Condition->new ( 'Created', '<', $delete_by ));
}

Last edited by:

mrcry11: Mar 11, 2003, 9:30 AM

Edit Log: