Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ENHANCEMENT: Remove unnecessary NULL check.

  • Loading branch information...
commit fdd5e71ba9651106e529e81e3255552ce23d3d3b 1 parent 0e8c3ac
@AngryPHPNerd AngryPHPNerd authored
Showing with 3 additions and 11 deletions.
  1. +3 −11 model/MySQLDatabase.php
View
14 model/MySQLDatabase.php
@@ -1158,18 +1158,10 @@ public function seek($row) {
public function numRecords() {
if(is_object($this->handle)) return $this->handle->num_rows;
}
-
+
public function nextRecord() {
- if(is_object($this->handle) && $data = $this->handle->fetch_row()) {
- $output = array();
- $this->handle->field_seek(0);
- while($field = $this->handle->fetch_field()) {
- $columnName = $field->name;
- if(isset($data[$this->handle->current_field-1]) || !isset($output[$columnName])) {
- $output[$columnName] = $data[$this->handle->current_field-1];
- }
- }
- return $output;
+ if(is_object($this->handle) && ($data = $this->handle->fetch_assoc())) {
+ return $data;
} else {
return false;
}
Please sign in to comment.
Something went wrong with that request. Please try again.