diff --git a/class.MySQL.php b/class.MySQL.php index be170ae..1002d5f 100644 --- a/class.MySQL.php +++ b/class.MySQL.php @@ -172,11 +172,10 @@ public function executeSQL($query){ if($this->result = mysql_query($query, $this->databaseLink)){ if (gettype($this->result) === 'resource') { $this->records = @mysql_num_rows($this->result); - $this->affected = @mysql_affected_rows($this->databaseLink); } else { $this->records = 0; - $this->affected = 0; } + $this->affected = @mysql_affected_rows($this->databaseLink); if($this->records > 0){ $this->arrayResults(); @@ -375,4 +374,4 @@ public function closeConnection(){ mysql_close($this->databaseLink); } } -} \ No newline at end of file +}