]> source.dussan.org Git - nextcloud-server.git/commitdiff
Quote key for SQLite.
authorThomas Tanghus <thomas@tanghus.net>
Mon, 25 Mar 2013 23:19:23 +0000 (00:19 +0100)
committerThomas Tanghus <thomas@tanghus.net>
Mon, 25 Mar 2013 23:19:23 +0000 (00:19 +0100)
lib/db.php

index cfa3b6cb9795249f4b27398508b323b08c969188..f7c43c2f77ffb6125f292cb203ae346859686058 100644 (file)
@@ -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 {