mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-19 19:22:14 +02:00
fetchmail.pl:
- add active=1/t to SQL query git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1766 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
parent
4322486b21
commit
8bad929a44
@ -81,9 +81,9 @@ $lockmgr->lock($lock_file) || log_and_die "can't lock ${lock_file}";
|
|||||||
$dbh = DBI->connect($dsn, $db_username, $db_password) || log_and_die "cannot connect the database";
|
$dbh = DBI->connect($dsn, $db_username, $db_password) || log_and_die "cannot connect the database";
|
||||||
|
|
||||||
if($db_type eq "Pg") {
|
if($db_type eq "Pg") {
|
||||||
$sql_cond = "date_part('epoch',now())-date_part('epoch',date)";
|
$sql_cond = "active = 1 AND date_part('epoch',now())-date_part('epoch',date)";
|
||||||
} elsif($db_type eq "mysql") {
|
} elsif($db_type eq "mysql") {
|
||||||
$sql_cond = "unix_timestamp(now())-unix_timestamp(date)";
|
$sql_cond = "active = 't' AND unix_timestamp(now())-unix_timestamp(date)";
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "
|
$sql = "
|
||||||
|
Loading…
Reference in New Issue
Block a user