diff options
author | Andrey Andreev <narf@devilix.net> | 2015-07-06 11:18:50 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2015-07-06 11:18:50 +0200 |
commit | e917f1d16ef21df8956a34c33774f06a5c024b42 (patch) | |
tree | a59af74d4084620ab360a26a403eb2a7495364d2 | |
parent | c79a62c5c43c75a3dbc0af77433694340b235047 (diff) | |
parent | 5cd726abed384ce594d07cc59dcd61f613f10d49 (diff) |
Merge pull request #3952 from ftwbzhao/develop
Fix SQlite3 list_fields()
-rw-r--r-- | system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php | 2 | ||||
-rw-r--r-- | system/database/drivers/sqlite3/sqlite3_driver.php | 2 | ||||
-rw-r--r-- | user_guide_src/source/changelog.rst | 1 |
3 files changed, 3 insertions, 2 deletions
diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php b/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php index d5ca741fd..409e6501b 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php @@ -140,7 +140,7 @@ class CI_DB_pdo_sqlite_driver extends CI_DB_pdo_driver { } $this->data_cache['field_names'][$table] = array(); - foreach ($result as $row) + foreach ($result->result_array() as $row) { $this->data_cache['field_names'][$table][] = $row['name']; } diff --git a/system/database/drivers/sqlite3/sqlite3_driver.php b/system/database/drivers/sqlite3/sqlite3_driver.php index a7c6420bb..31e37de91 100644 --- a/system/database/drivers/sqlite3/sqlite3_driver.php +++ b/system/database/drivers/sqlite3/sqlite3_driver.php @@ -266,7 +266,7 @@ class CI_DB_sqlite3_driver extends CI_DB { } $this->data_cache['field_names'][$table] = array(); - foreach ($result as $row) + foreach ($result->result_array() as $row) { $this->data_cache['field_names'][$table][] = $row['name']; } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 432d65e00..92d8bb164 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -48,6 +48,7 @@ Bug fixes for 3.0.1 - Fixed a bug (#3913) - :doc:`Cache Library <libraries/caching>` didn't work with the direct ``$this->cache->$driver_name->method()`` syntax with Redis and Memcache(d). - Fixed a bug (#3932) - :doc:`Query Builder <database/query_builder>` didn't properly compile WHERE and HAVING conditions for field names that end with "and", "or". - Fixed a bug in :doc:`Query Builder <database/query_builder>` where ``delete()`` didn't properly work on multiple tables with a WHERE condition previously set via ``where()``. +- Fixed a bug (#3952) - :doc:`Database <database/index>` method ``list_fields()`` didn't work with SQLite3. - Fixed a bug (#3955) - :doc:`Cache Library <libraries/caching>` methods ``increment()`` and ``decrement()`` ignored the 'key_prefix' setting. Version 3.0.0 |