diff options
author | Phil Sturgeon <email@philsturgeon.co.uk> | 2012-03-06 10:56:02 +0100 |
---|---|---|
committer | Phil Sturgeon <email@philsturgeon.co.uk> | 2012-03-06 10:56:02 +0100 |
commit | afca1f0b9585d7119b80e4b188d06ee0bcc8eca1 (patch) | |
tree | 74bdf7b79415e83cabb1d27d815ac4ec88318a1e /system/database/drivers/odbc/odbc_result.php | |
parent | 883f80f7ed758f384847af3db0082f9fb6e525ee (diff) | |
parent | 6b83123dce4a78e06f6eedc7cb1b2bb78d2294f0 (diff) |
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into develop
Diffstat (limited to 'system/database/drivers/odbc/odbc_result.php')
-rw-r--r-- | system/database/drivers/odbc/odbc_result.php | 35 |
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 */ |