Quote key for SQLite.

This commit is contained in:
Thomas Tanghus 2013-03-26 00:19:23 +01:00
parent 1c3f5ba6ef
commit 07236800a7
1 changed files with 1 additions and 1 deletions

View File

@ -640,7 +640,7 @@ class OC_DB {
// otherwise all fieldnames used must have a unique key. // otherwise all fieldnames used must have a unique key.
$query = 'SELECT * FROM "' . $table . '" WHERE '; $query = 'SELECT * FROM "' . $table . '" WHERE ';
foreach($input as $key => $value) { foreach($input as $key => $value) {
$query .= $key . ' = ? AND '; $query .= '"' .$key . '"' . ' = ? AND ';
} }
$query = substr($query, 0, strlen($query) - 5); $query = substr($query, 0, strlen($query) - 5);
try { try {