From: Will Budicm Date: Fri, 25 Dec 2020 21:49:58 +0000 (+1100) Subject: Added pgsql support. X-Git-Url: https://lifelog.hopto.org/gitweb/?a=commitdiff_plain;h=9f6036a68430aecf42d7e4e8a87770b0510da61b;p=LifeLog.git Added pgsql support. --- diff --git a/htdocs/cgi-bin/login_ctr.cgi b/htdocs/cgi-bin/login_ctr.cgi index 4b21c67..f30b72e 100755 --- a/htdocs/cgi-bin/login_ctr.cgi +++ b/htdocs/cgi-bin/login_ctr.cgi @@ -500,14 +500,15 @@ try{ sub createPageViewExcludeSQL { - my $days = 0; + my ($where,$days) = 0; my $parse = $PAGE_EXCLUDES; my @a = split('=',$parse); if(scalar(@a)==2){ $days = $a[0]; $parse = $a[1]; - } - my $where =qq(WHERE date >= date('now', '-$days day') OR); + } + if(Settings::isProgressDB()){$where = "WHERE a.date >= (timestamp 'now' - interval '$days days') OR"} + else{$where = "WHERE a.date >= date('now', '-$days day') OR"} @a = split(',',$parse); foreach (@a){ $where .= " ID_CAT!=$_ AND";