From: Thomas Tanghus Date: Mon, 25 Mar 2013 23:19:23 +0000 (+0100) Subject: Quote key for SQLite. X-Git-Tag: v6.0.0alpha2~1009^2~4 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=07236800a7c676140b487a6bc22146921c9c88a2;p=nextcloud-server.git Quote key for SQLite. --- diff --git a/lib/db.php b/lib/db.php index cfa3b6cb979..f7c43c2f77f 100644 --- a/lib/db.php +++ b/lib/db.php @@ -640,7 +640,7 @@ class OC_DB { // otherwise all fieldnames used must have a unique key. $query = 'SELECT * FROM "' . $table . '" WHERE '; foreach($input as $key => $value) { - $query .= $key . ' = ? AND '; + $query .= '"' .$key . '"' . ' = ? AND '; } $query = substr($query, 0, strlen($query) - 5); try {