Skip to content

Commit f2b9185

Browse files
authored
Merge pull request #584 from shimscharf/master
fixed delete statement return value
2 parents 04cd1ab + ad96b4f commit f2b9185

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

MysqliDb.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ public function delete($tableName, $numRows = null)
804804
$this->_stmtErrno = $stmt->errno;
805805
$this->reset();
806806

807-
return ($stmt->affected_rows > 0);
807+
return ($stmt->affected_rows > -1); // affected_rows returns 0 if nothing matched where statement, or required updating, -1 if error
808808
}
809809

810810
/**

0 commit comments

Comments
 (0)