diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-03-05 15:17:32 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-03-05 15:17:32 +0100 |
commit | 99013ed3ed0ea5641a6c6b6afa08a7befb579cb0 (patch) | |
tree | ec85d2c3b418d87366d88f9efc96c03bfa839fdb /system/database/drivers/odbc/odbc_result.php | |
parent | 62d6ee48b319dc7ec92b4a14fa8dbd3601060544 (diff) | |
parent | 57bdeb61bf199d1ae3ceaede4e9a9af8290ce715 (diff) |
Rename property _commit to commit_mode and merge upstream changes
Diffstat (limited to 'system/database/drivers/odbc/odbc_result.php')
-rw-r--r-- | system/database/drivers/odbc/odbc_result.php | 36 |
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 */ |