1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-08 23:26:49 +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

@@ -93,13 +93,14 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver, IDibiResultDriv
*/
public function query($sql)
{
$this->resultSet = @mssql_query($sql, $this->connection); // intentionally @
$res = @mssql_query($sql, $this->connection); // intentionally @
if ($this->resultSet === FALSE) {
if ($res === FALSE) {
throw new DibiDriverException(mssql_get_last_message(), 0, $sql);
}
return is_resource($this->resultSet) ? $this->createResultDriver($this->resultSet) : NULL;
} elseif (is_resource($res)) {
return $this->createResultDriver($res);
}
}