Skip to content

Commit

Permalink
Fix getAffectedRows() on literal queries (queries without placeholders)
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier ROUX committed Dec 4, 2009
1 parent ce15bc1 commit 5264777
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions MyDBD.php
Expand Up @@ -357,9 +357,10 @@ public function query()
}
else
{
$result = $this->link()->query($query);
$link = $this->link();
$result = $link->query($query);
$this->handleErrors($query);
$this->lastQueryHandle = $this->link(); // used by getAffectedRows()
$this->lastQueryHandle = $link; // used by getAffectedRows()

if ($result instanceof mysqli_result)
{
Expand Down

0 comments on commit 5264777

Please sign in to comment.