1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-13 01:24:06 +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

@@ -156,13 +156,14 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver, IDibiResultDri
*/
public function query($sql)
{
$this->resultSet = @mysqli_query($this->connection, $sql, $this->buffered ? MYSQLI_STORE_RESULT : MYSQLI_USE_RESULT); // intentionally @
$res = @mysqli_query($this->connection, $sql, $this->buffered ? MYSQLI_STORE_RESULT : MYSQLI_USE_RESULT); // intentionally @
if (mysqli_errno($this->connection)) {
throw new DibiDriverException(mysqli_error($this->connection), mysqli_errno($this->connection), $sql);
}
return is_object($this->resultSet) ? $this->createResultDriver($this->resultSet) : NULL;
} elseif (is_object($res)) {
return $this->createResultDriver($res);
}
}