From 5a677f1151ec726bcc147eee3e0743ca3153125e Mon Sep 17 00:00:00 2001 From: nikrou Date: Tue, 22 Jun 2010 21:01:05 +0000 Subject: Bug 1738 fixed : hour function doesn't exists for database other than mysql. git-svn-id: http://piwigo.org/svn/trunk@6578 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/dblayer/functions_pgsql.inc.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/dblayer/functions_pgsql.inc.php') diff --git a/include/dblayer/functions_pgsql.inc.php b/include/dblayer/functions_pgsql.inc.php index 6492e82ef..8a300b7ad 100644 --- a/include/dblayer/functions_pgsql.inc.php +++ b/include/dblayer/functions_pgsql.inc.php @@ -544,6 +544,11 @@ function pwg_db_get_recent_period($period, $date='CURRENT_DATE') return $d; } +function pwg_db_get_hour($date) +{ + return 'EXTRACT(HOUR FROM '.$date.')'; +} + function pwg_db_get_date_YYYYMM($date) { return 'TO_CHAR('.$date.', \'YYYYMM\')'; -- cgit v1.2.3