From 9e94576e62e9edb5634cb3f4d278038069bb70a8 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 13 Nov 2012 01:08:34 +0200 Subject: Fix issue #1994 --- system/database/DB_utility.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/database/DB_utility.php') diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php index 488ebf3ac..a32fd4455 100644 --- a/system/database/DB_utility.php +++ b/system/database/DB_utility.php @@ -106,9 +106,9 @@ abstract class CI_DB_utility { return $this->db->data_cache['db_names']; } - for ($i = 0, $c = count($query); $i < $c; $i++) + for ($i = 0, $query = $query->result_array(), $c = count($query); $i < $c; $i++) { - $this->db->data_cache['db_names'] = current($query[$i]); + $this->db->data_cache['db_names'][] = current($query[$i]); } return $this->db->data_cache['db_names']; -- cgit v1.2.3-24-g4f1b