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 ));
}
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 ));
}