Browse Source

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 years ago
parent
commit
2563980bf2
1 changed files with 5 additions and 3 deletions
  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)
     public function describeTable($tableName, $schemaName = null)
     {
     {
+        $sql = 'PRAGMA ';
+        
         if ($schemaName) {
         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);
         $stmt = $this->query($sql);