Skip to content

Commit

Permalink
Resolve issue #85
Browse files Browse the repository at this point in the history
  • Loading branch information
pautiina committed Jul 9, 2017
1 parent cedcba2 commit 277b9c6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api/libs/api.dbconnect.php
Expand Up @@ -2,7 +2,7 @@

error_reporting(E_ALL ^ E_DEPRECATED); //hide some deprecated warnings on 5.6 :(

Class DbConnect {
class DbConnect {

var $host = '';
var $user = '';
Expand Down Expand Up @@ -97,23 +97,23 @@ public function fetchobject() {
if (!extension_loaded('mysqli')) {
return(@mysql_fetch_object($this->result, MYSQL_ASSOC));
} else {
return($this->result->fetch_object());
return($result = $this->result->fetch_object());
}
}

public function fetcharray() {
if (!extension_loaded('mysqli')) {
return(mysql_fetch_array($this->result));
} else {
return($this->result->fetch_array(MYSQLI_NUM));
return($result = @$this->result->fetch_array(MYSQLI_NUM));
}
}

public function fetchassoc() {
if (!extension_loaded('mysqli')) {
return(@mysql_fetch_assoc($this->result));
} else {
return(@$this->result->fetch_assoc());
return($result = @$this->result->fetch_assoc());
}
}

Expand Down

0 comments on commit 277b9c6

Please sign in to comment.