blob: fe945904f6ee4559af7bc6747a9ed1360f93f34d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package FS::Cron::expire_banned_pay;
use vars qw( @ISA @EXPORT_OK );
use Exporter;
use FS::UID qw(dbh);
@ISA = qw( Exporter );
@EXPORT_OK = qw( expire_banned_pay );
sub expire_banned_pay {
my $sql = "DELETE FROM banned_pay WHERE end_date IS NOT NULL".
" AND end_date < ?";
my $sth = dbh->prepare($sql) or die dbh->errstr;
$sth->execute(time) or die $sth->errstr;
dbh->commit or die dbh->errstr if $FS::UID::AutoCommit
}
1;
|