summaryrefslogtreecommitdiffstats
path: root/system/database
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-03-05 13:02:15 +0100
committerAndrey Andreev <narf@bofh.bg>2012-03-05 13:02:15 +0100
commitcc5af53346397846f2035dc2bf6a2c2f9b0cd4ab (patch)
tree6f0f6691c013191266358a573de751473ef9937e /system/database
parente1ae17db17c6ed1f70ab1b7b539057c17104ccd7 (diff)
Fix issue #1125
Diffstat (limited to 'system/database')
-rw-r--r--system/database/drivers/odbc/odbc_result.php36
1 files changed, 35 insertions, 1 deletions
diff --git a/system/database/drivers/odbc/odbc_result.php b/system/database/drivers/odbc/odbc_result.php
index 572e110ca..2d5b50a8d 100644
--- a/system/database/drivers/odbc/odbc_result.php
+++ b/system/database/drivers/odbc/odbc_result.php
@@ -245,8 +245,42 @@ class CI_DB_odbc_result extends CI_DB_result {
return $rs_assoc;
}
-}
+ // --------------------------------------------------------------------
+
+ /**
+ * Query result. Array version.
+ *
+ * @return array
+ */
+ public function result_array()
+ {
+ if (count($this->result_array) > 0)
+ {
+ return $this->result_array;
+ }
+ elseif (($c = count($this->result_object)) > 0)
+ {
+ for ($i = 0; $i < $c; $i++)
+ {
+ $this->result_array[$i] = (array) $this->result_object[$i];
+ }
+ }
+ elseif ($this->result_id === FALSE)
+ {
+ return array();
+ }
+ else
+ {
+ while ($row = $this->_fetch_assoc())
+ {
+ $this->result_array[] = $row;
+ }
+ }
+ return $this->result_array;
+ }
+
+}
/* End of file odbc_result.php */
/* Location: ./system/database/drivers/odbc/odbc_result.php */