1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-12 17:14:16 +02:00

drivers implementing IDibiDriver and IDibiResultDriver together do not use $resultSet in IDibiDriver part

This commit is contained in:
David Grudl
2010-11-02 14:11:03 +01:00
parent 32baabdeac
commit 087734fb23
11 changed files with 75 additions and 51 deletions

View File

@@ -115,12 +115,13 @@ class DibiSqlite3Driver extends DibiObject implements IDibiDriver, IDibiResultDr
$sql = iconv($this->charset, $this->dbcharset . '//IGNORE', $sql);
}
$this->resultSet = @$this->connection->query($sql); // intentionally @
$res = @$this->connection->query($sql); // intentionally @
if ($this->connection->lastErrorCode()) {
throw new DibiDriverException($this->connection->lastErrorMsg(), $this->connection->lastErrorCode(), $sql);
}
return $this->resultSet instanceof SQLite3Result ? $this->createResultDriver($this->resultSet) : NULL;
} elseif ($res instanceof SQLite3Result) {
return $this->createResultDriver($res);
}
}