Change sqlite escaping of identifier to double quote. Fixing some issues

This commit is contained in:
Brice Maron 2012-05-11 19:45:24 +00:00
parent 919681f3e6
commit 5b7c69f978

View file

@ -444,7 +444,7 @@ class OC_DB {
// differences in escaping of table names ('`' for mysql) and getting the current timestamp
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 );
}elseif( $type == 'mysql' ){