diff --git a/lib/db.php b/lib/db.php
index 78a4da10ce8361f0605a0fb9c5fb979bfdd86441..bcfda4592f2ee9129a0b1bc7d917ba3d9f263f42 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 );