From 77378fa1893267bbdd6ee2f7805a34c1d5b0977b Mon Sep 17 00:00:00 2001 From: Robin Appelman <icewind1991@gmail.com> Date: Mon, 17 Oct 2011 00:24:42 +0200 Subject: [PATCH] fix now() function for sqlite3 --- lib/db.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/db.php b/lib/db.php index 78a4da10ce..bcfda4592f 100644 --- a/lib/db.php +++ b/lib/db.php @@ -350,7 +350,7 @@ class OC_DB { $prefix = OC_Config::getValue( "dbtableprefix", "oc_" ); // differences in escaping of table names ('`' for mysql) and getting the current timestamp - if( $type == 'sqlite' ){ + if( $type == 'sqlite' || $type == 'sqlite3' ){ $query = str_replace( '`', '\'', $query ); $query = str_replace( 'NOW()', 'datetime(\'now\')', $query ); $query = str_replace( 'now()', 'datetime(\'now\')', $query ); -- GitLab