Pārlūkot izejas kodu

ZF-7821
- Fixed Zend_Db_Adapter_Pdo_Sqlite to use quotedIdentifiers in describeTable()

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@18213 44c647ce-9c0f-0410-b52a-842ac1e357ba

ralph 16 gadi atpakaļ
vecāks
revīzija
2563980bf2
1 mainītis faili ar 5 papildinājumiem un 3 dzēšanām
  1. 5 3
      library/Zend/Db/Adapter/Pdo/Sqlite.php

+ 5 - 3
library/Zend/Db/Adapter/Pdo/Sqlite.php

@@ -197,11 +197,13 @@ class Zend_Db_Adapter_Pdo_Sqlite extends Zend_Db_Adapter_Pdo_Abstract
      */
     public function describeTable($tableName, $schemaName = null)
     {
+        $sql = 'PRAGMA ';
+        
         if ($schemaName) {
-            $sql = "PRAGMA $schemaName.table_info($tableName)";
-        } else {
-            $sql = "PRAGMA table_info($tableName)";
+            $sql .= $this->quoteIdentifier($schemaName) . '.';
         }
+        
+        $sql .= 'table_info('.$this->quoteIdentifier($tableName).')';
 
         $stmt = $this->query($sql);