see #377 - looks like the pg+mysql check is partly the wrong way around - mysql only has ints....

git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1856 a1433add-5e2c-0410-b055-b7f2511e0802
pull/19/head
David Goodwin 8 years ago
parent 3d28caf759
commit 483bb83edc

@ -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";
if($db_type eq "Pg") {
$sql_cond = "active = 1 AND date_part('epoch',now())-date_part('epoch',date)";
$sql_cond = "active = 't' AND date_part('epoch',now())-date_part('epoch',date)";
} elsif($db_type eq "mysql") {
$sql_cond = "active = 't' AND unix_timestamp(now())-unix_timestamp(date)";
$sql_cond = "active = 1 AND unix_timestamp(now())-unix_timestamp(date)";
}
$sql = "

Loading…
Cancel
Save