1
0
mirror of https://github.com/dg/dibi.git synced 2025-10-22 10:16:02 +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,16 +156,17 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver, IDibiResultDriv
public function query($sql)
{
if ($this->buffered) {
$this->resultSet = @mysql_query($sql, $this->connection); // intentionally @
$res = @mysql_query($sql, $this->connection); // intentionally @
} else {
$this->resultSet = @mysql_unbuffered_query($sql, $this->connection); // intentionally @
$res = @mysql_unbuffered_query($sql, $this->connection); // intentionally @
}
if (mysql_errno($this->connection)) {
throw new DibiDriverException(mysql_error($this->connection), mysql_errno($this->connection), $sql);
}
return is_resource($this->resultSet) ? $this->createResultDriver($this->resultSet) : NULL;
} elseif (is_resource($res)) {
return $this->createResultDriver($res);
}
}