Skip to content

Commit 1e3869a

Browse files
committed
Merge pull request #45 from jfcherng/master
fix $affected while querying an UPDATE
2 parents a72abda + 204358d commit 1e3869a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

class.MySQL.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,10 @@ public function executeSQL($query){
183183
if($this->result = mysql_query($query, $this->databaseLink)){
184184
if (gettype($this->result) === 'resource') {
185185
$this->records = @mysql_num_rows($this->result);
186-
$this->affected = @mysql_affected_rows($this->databaseLink);
187186
} else {
188187
$this->records = 0;
189-
$this->affected = 0;
190188
}
189+
$this->affected = @mysql_affected_rows($this->databaseLink);
191190

192191
if($this->records > 0){
193192
$this->arrayResults();

0 commit comments

Comments
 (0)