Correct SQL syntax.
This commit is contained in:
parent
82e010c51c
commit
42b871dcf1
|
@ -559,7 +559,7 @@ class OC_DB {
|
||||||
$query = '';
|
$query = '';
|
||||||
// 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' || $type == 'sqlite3' ) {
|
if( $type == 'sqlite' || $type == 'sqlite3' ) {
|
||||||
$query = 'REPLACE OR INSERT INTO "' . $table . '" ("'
|
$query = 'INSERT OR REPLACE INTO "' . $table . '" ("'
|
||||||
. implode('","', array_keys($input)) . '") VALUES("'
|
. implode('","', array_keys($input)) . '") VALUES("'
|
||||||
. implode('","', array_values($input)) . '")';
|
. implode('","', array_values($input)) . '")';
|
||||||
} elseif( $type == 'pgsql' || $type == 'oci' || $type == 'mysql') {
|
} elseif( $type == 'pgsql' || $type == 'oci' || $type == 'mysql') {
|
||||||
|
|
Loading…
Reference in New Issue