From 6e01f9e1cc149c2b0f84ffb0ec73291bfd74fb9e Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Tue, 2 Nov 2010 18:38:02 -0400 Subject: [PATCH] Don't use numeric offsets, use column names instead. --- framework/Db/lib/Horde/Db/Adapter/Sqlite/Schema.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/framework/Db/lib/Horde/Db/Adapter/Sqlite/Schema.php b/framework/Db/lib/Horde/Db/Adapter/Sqlite/Schema.php index 19659d407..244942344 100644 --- a/framework/Db/lib/Horde/Db/Adapter/Sqlite/Schema.php +++ b/framework/Db/lib/Horde/Db/Adapter/Sqlite/Schema.php @@ -184,15 +184,14 @@ class Horde_Db_Adapter_Sqlite_Schema extends Horde_Db_Adapter_Base_Schema if (!$rows) { $rows = $this->selectAll('PRAGMA table_info(' . $this->quoteTableName($tableName) . ')', $name); - $this->_cache->set("tables/columns/$tableName", serialize($rows)); } // create columns from rows $columns = array(); foreach ($rows as $row) { - $columns[$row[1]] = $this->makeColumn( - $row[1], $row[4], $row[2], !(bool)$row[3]); + $columns[$row['name']] = $this->makeColumn( + $row['name'], $row['dflt_value'], $row['type'], !(bool)$row['notnull']); } return $columns; -- 2.11.0