Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1e3869a

Browse files
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

Lines changed: 1 addition & 2 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /