diff options
Diffstat (limited to 'include/dblayer/functions_pgsql.inc.php')
-rw-r--r-- | include/dblayer/functions_pgsql.inc.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/dblayer/functions_pgsql.inc.php b/include/dblayer/functions_pgsql.inc.php index a9f033fc3..598a699f5 100644 --- a/include/dblayer/functions_pgsql.inc.php +++ b/include/dblayer/functions_pgsql.inc.php @@ -546,6 +546,11 @@ function pwg_db_get_recent_period($period, $date='CURRENT_DATE') return $d; } +function pwg_db_get_flood_period_expression($seconds) +{ + return 'now() - \''.$seconds.' SECOND\'::interval'; +} + function pwg_db_get_hour($date) { return 'EXTRACT(HOUR FROM '.$date.')'; |