summaryrefslogtreecommitdiffstats
path: root/system/database
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-03-29 10:35:32 +0200
committerAndrey Andreev <narf@bofh.bg>2012-03-29 10:35:32 +0200
commit38b2a256758ee8184d354cbdb0eac467118af36b (patch)
tree5f18e1ac708ae62c43661fc9f47cfd402e020525 /system/database
parent22b9e5f5a2a95b5ab0e77423c8807318b8c4b030 (diff)
Changed the dummy DB free_result() method to void (that's how it's implemented by all drivers) and some style/comment changes in DB_result
Diffstat (limited to 'system/database')
-rw-r--r--system/database/DB_result.php21
1 files changed, 10 insertions, 11 deletions
diff --git a/system/database/DB_result.php b/system/database/DB_result.php
index 04f964fb1..bb09c014c 100644
--- a/system/database/DB_result.php
+++ b/system/database/DB_result.php
@@ -57,7 +57,7 @@ class CI_DB_result {
* Query result. Acts as a wrapper function for the following functions.
*
* @param string can be "object" or "array"
- * @return mixed either a result object or array
+ * @return object
*/
public function result($type = 'object')
{
@@ -108,9 +108,9 @@ class CI_DB_result {
// --------------------------------------------------------------------
/**
- * Query result. "object" version.
+ * Query result. "object" version.
*
- * @return object
+ * @return array
*/
public function result_object()
{
@@ -224,7 +224,7 @@ class CI_DB_result {
return;
}
- if ($key != '' AND ! is_null($value))
+ if ($key != '' && ! is_null($value))
{
$this->row_data[$key] = $value;
}
@@ -245,7 +245,7 @@ class CI_DB_result {
return $result;
}
- if ($n != $this->current_row AND isset($result[$n]))
+ if ($n != $this->current_row && isset($result[$n]))
{
$this->current_row = $n;
}
@@ -266,7 +266,7 @@ class CI_DB_result {
return $result;
}
- if ($n != $this->current_row AND isset($result[$n]))
+ if ($n != $this->current_row && isset($result[$n]))
{
$this->current_row = $n;
}
@@ -289,7 +289,7 @@ class CI_DB_result {
return $result;
}
- if ($n != $this->current_row AND isset($result[$n]))
+ if ($n != $this->current_row && isset($result[$n]))
{
$this->current_row = $n;
}
@@ -297,7 +297,6 @@ class CI_DB_result {
return $result[$this->current_row];
}
-
// --------------------------------------------------------------------
/**
@@ -374,9 +373,9 @@ class CI_DB_result {
/**
* 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.
+ * is used. When caching is enabled we do not load the other driver.
* These functions are primarily here to prevent undefined function errors
- * when a cached result object is in use. They are not otherwise fully
+ * when a cached result object is in use. They are not otherwise fully
* operational due to the unavailability of the database resource IDs with
* cached results.
*/
@@ -384,7 +383,7 @@ class CI_DB_result {
public function num_fields() { return 0; }
public function list_fields() { return array(); }
public function field_data() { return array(); }
- public function free_result() { return TRUE; }
+ public function free_result() { $this->result_id = FALSE; }
protected function _data_seek() { return TRUE; }
protected function _fetch_assoc() { return array(); }
protected function _fetch_object() { return array(); }