1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-30 17:29:53 +02:00

* removed variables $insertId & $affectedRows

This commit is contained in:
David Grudl
2007-08-28 22:13:53 +00:00
parent 0ff0cd21df
commit 6f4d2c545d
8 changed files with 115 additions and 103 deletions

View File

@@ -23,6 +23,7 @@ if (!class_exists('dibi', FALSE)) die();
class DibiPostgreDriver extends DibiDriver
{
private
$insertId = FALSE,
$affectedRows = FALSE;
public
@@ -83,7 +84,7 @@ class DibiPostgreDriver extends DibiDriver
public function nativeQuery($sql)
{
$this->affectedRows = FALSE;
$this->insertId = $this->affectedRows = FALSE;
$res = @pg_query($this->getConnection(), $sql);
@@ -91,6 +92,9 @@ class DibiPostgreDriver extends DibiDriver
return FALSE;
} elseif (is_resource($res)) {
$this->insertId = pg_last_oid($res);
if ($this->insertId < 0) $this->insertId = FALSE;
$this->affectedRows = pg_affected_rows($res);
if ($this->affectedRows < 0) $this->affectedRows = FALSE;
@@ -112,7 +116,7 @@ class DibiPostgreDriver extends DibiDriver
public function insertId()
{
return FALSE;
return $this->insertId;
}