aboutsummaryrefslogtreecommitdiffstats
path: root/include/dblayer/functions_sqlite.inc.php
diff options
context:
space:
mode:
authornikrou <nikrou@piwigo.org>2010-07-06 12:17:37 +0000
committernikrou <nikrou@piwigo.org>2010-07-06 12:17:37 +0000
commit4845a85685c3d9cb02334dd78a008f58b0b98c10 (patch)
tree2312a365c5424e68da83b7a12738c2194b42482c /include/dblayer/functions_sqlite.inc.php
parentb2d7edfc173228035f9dfadb73caa01e88b2b7e4 (diff)
Bug 1766 fixed : [PostgreSQL] unkown database function UNIX_TIMESTAMP()
Add a new function pwg_db_date_to_ts() to calculate a timestamp from a date Merge from trunk git-svn-id: http://piwigo.org/svn/branches/2.1@6667 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/dblayer/functions_sqlite.inc.php')
-rw-r--r--include/dblayer/functions_sqlite.inc.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/dblayer/functions_sqlite.inc.php b/include/dblayer/functions_sqlite.inc.php
index 109f5f21d..c12116355 100644
--- a/include/dblayer/functions_sqlite.inc.php
+++ b/include/dblayer/functions_sqlite.inc.php
@@ -561,6 +561,11 @@ function pwg_db_get_weekday($date)
return 'strftime(\'%w\',date('.$date.',\'-1 DAY\'))';
}
+function pwg_db_date_to_ts($date)
+{
+ return 'UNIX_TIMESTAMP('.$date.')';
+}
+
// my_error returns (or send to standard output) the message concerning the
// error occured for the last mysql query.
function my_error($header, $die)