summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/odbc/odbc_result.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-03-05 13:23:57 +0100
committerAndrey Andreev <narf@bofh.bg>2012-03-05 13:23:57 +0100
commit74496c268ae7199082cad86e0fea65687d78a2c9 (patch)
tree7a02e9961dda1e6949c4cbd986c894ffb9ed15a3 /system/database/drivers/odbc/odbc_result.php
parentbb5dae46256cdcb0bcd204b6fa2fc628da6afb88 (diff)
parentcc5af53346397846f2035dc2bf6a2c2f9b0cd4ab (diff)
Merge upstream branch
Diffstat (limited to 'system/database/drivers/odbc/odbc_result.php')
-rw-r--r--system/database/drivers/odbc/odbc_result.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/system/database/drivers/odbc/odbc_result.php b/system/database/drivers/odbc/odbc_result.php
index b040c1e72..042c915f9 100644
--- a/system/database/drivers/odbc/odbc_result.php
+++ b/system/database/drivers/odbc/odbc_result.php
@@ -237,6 +237,41 @@ 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 */