]> source.dussan.org Git - nextcloud-server.git/commitdiff
Double quotes to backticks
authorThomas Tanghus <thomas@tanghus.net>
Tue, 26 Mar 2013 00:00:15 +0000 (01:00 +0100)
committerThomas Tanghus <thomas@tanghus.net>
Tue, 26 Mar 2013 00:00:15 +0000 (01:00 +0100)
lib/db.php

index 1a4b0a86c61b343c02459762dc5c3a553c7afabc..9d0b200790194c2d762bdae0b79c8382b831b88f 100644 (file)
@@ -638,9 +638,9 @@ class OC_DB {
                if( $type == 'sqlite' || $type == 'sqlite3' ) {
                        // NOTE: For SQLite we have to use this clumsy approach
                        // otherwise all fieldnames used must have a unique key.
-                       $query = 'SELECT * FROM "' . $table . '" WHERE ';
+                       $query = 'SELECT * FROM `' . $table . '` WHERE ';
                        foreach($input as $key => $value) {
-                               $query .= '"' . $key . '" = ? AND ';
+                               $query .= '`' . $key . '` = ? AND ';
                        }
                        $query = substr($query, 0, strlen($query) - 5);
                        try {
@@ -656,8 +656,8 @@ class OC_DB {
                        }
 
                        if((int)$result->numRows() === 0) {
-                               $query = 'INSERT INTO "' . $table . '" ("'
-                                       . implode('","', array_keys($input)) . '") VALUES('
+                               $query = 'INSERT INTO `' . $table . '` (`'
+                                       . implode('`,`', array_keys($input)) . '`) VALUES('
                                        . str_repeat('?,', count($input)-1).'? ' . ')';
                        } else {
                                return true;