aboutsummaryrefslogtreecommitdiffstats
path: root/include/dblayer/functions_mysql.inc.php
diff options
context:
space:
mode:
authornikrou <nikrou@piwigo.org>2010-06-22 21:01:47 +0000
committernikrou <nikrou@piwigo.org>2010-06-22 21:01:47 +0000
commit1661af7f3f10bd303d2a1e71054fe9ba57954604 (patch)
tree2f3fd38ea5b26712c3641bd5e15f45aff74001c7 /include/dblayer/functions_mysql.inc.php
parent7629b2723a4e8691cef8c5056c300ac3b3143ce7 (diff)
Bug 1738 fixed : merge from trunk
hour function doesn't exists for database other than mysql. git-svn-id: http://piwigo.org/svn/branches/2.1@6579 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/dblayer/functions_mysql.inc.php')
-rw-r--r--include/dblayer/functions_mysql.inc.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/dblayer/functions_mysql.inc.php b/include/dblayer/functions_mysql.inc.php
index 3160e1902..5e0c4dcd4 100644
--- a/include/dblayer/functions_mysql.inc.php
+++ b/include/dblayer/functions_mysql.inc.php
@@ -580,6 +580,11 @@ SELECT '.pwg_db_get_recent_period_expression($period);
return $d;
}
+function pwg_db_get_hour($date)
+{
+ return 'hour('.$date.')';
+}
+
function pwg_db_get_date_YYYYMM($date)
{
return 'DATE_FORMAT('.$date.', \'%Y%m\')';