summaryrefslogtreecommitdiffstats
path: root/system/database
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-03-06 09:34:58 +0100
committerAndrey Andreev <narf@bofh.bg>2012-03-06 09:34:58 +0100
commit9c68c3173c84041b1ee77929e540a4a4382edeee (patch)
treeba1d66a802c1b53ee59bb568d91d9a9ad0ccce59 /system/database
parent3018c96ea6c52831d69e38bc64ed454fd0fde498 (diff)
Fix issue #1125 ... for real
Diffstat (limited to 'system/database')
-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 2d5b50a8d..de2c58cb9 100644
--- a/system/database/drivers/odbc/odbc_result.php
+++ b/system/database/drivers/odbc/odbc_result.php
@@ -280,6 +280,41 @@ class CI_DB_odbc_result extends CI_DB_result {
return $this->result_array;
}
+ // --------------------------------------------------------------------
+
+ /**
+ * Query result. Object version.
+ *
+ * @return array
+ */
+ public function result_object()
+ {
+ if (count($this->result_object) > 0)
+ {
+ return $this->result_object;
+ }
+ elseif (($c = count($this->result_array)) > 0)
+ {
+ for ($i = 0; $i < $c; $i++)
+ {
+ $this->result_object[$i] = (object) $this->result_array[$i];
+ }
+ }
+ elseif ($this->result_id === FALSE)
+ {
+ return array();
+ }
+ else
+ {
+ while ($row = $this->_fetch_object())
+ {
+ $this->result_object[] = $row;
+ }
+ }
+
+ return $this->result_object;
+ }
+
}
/* End of file odbc_result.php */