fix now() function for sqlite3
This commit is contained in:
parent
330c513015
commit
77378fa189
|
@ -350,7 +350,7 @@ class OC_DB {
|
||||||
$prefix = OC_Config::getValue( "dbtableprefix", "oc_" );
|
$prefix = OC_Config::getValue( "dbtableprefix", "oc_" );
|
||||||
|
|
||||||
// differences in escaping of table names ('`' for mysql) and getting the current timestamp
|
// 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( '`', '\'', $query );
|
||||||
$query = str_replace( 'NOW()', 'datetime(\'now\')', $query );
|
$query = str_replace( 'NOW()', 'datetime(\'now\')', $query );
|
||||||
$query = str_replace( 'now()', 'datetime(\'now\')', $query );
|
$query = str_replace( 'now()', 'datetime(\'now\')', $query );
|
||||||
|
|
Loading…
Reference in New Issue