mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-19 19:22:14 +02:00
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
This commit is contained in:
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…
Reference in New Issue
Block a user