summaryrefslogtreecommitdiffstats
path: root/system/database
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-05-21 10:07:52 +0200
committerAndrey Andreev <narf@bofh.bg>2012-05-21 10:07:52 +0200
commit1d79efea47d26e0e567f919c648adf5b554f3ff0 (patch)
tree51acc79fed5144c281e64c7e9b3f056024903fc4 /system/database
parent67a08ed578350d3a25c77855dc3467320be9e6f6 (diff)
parent441dfc3a17f48c741a930cfc8a6d667bf0c352ba (diff)
Merge pull request #1372 from juanitomint/develop
Added unbuffered_row() function (issue #1351)
Diffstat (limited to 'system/database')
-rw-r--r--system/database/DB_result.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/system/database/DB_result.php b/system/database/DB_result.php
index 196febe2c..25b4fb911 100644
--- a/system/database/DB_result.php
+++ b/system/database/DB_result.php
@@ -371,6 +371,19 @@ class CI_DB_result {
// --------------------------------------------------------------------
/**
+ * Returns an unbuffered row and move pointer to next row
+ *
+ * @return mixed either a result object or array
+ */
+ public function unbuffered_row($type = 'object')
+ {
+ return ($type !== 'array') ? $this->_fetch_object() : $this->_fetch_assoc();
+
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* The following functions are normally overloaded by the identically named
* methods in the platform-specific driver -- except when query caching
* is used. When caching is enabled we do not load the other driver.