mirror of
https://github.com/dg/dibi.git
synced 2025-08-12 00:54:11 +02:00
- added DibiVariable (experimental)
- fixed bug in DibiPostgreDriver::insertId()
This commit is contained in:
@@ -265,6 +265,7 @@ class DibiMsSqlDriver extends NObject implements DibiDriverInterface
|
||||
public function free()
|
||||
{
|
||||
mssql_free_result($this->resultset);
|
||||
$this->resultset = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -310,6 +310,7 @@ class DibiMySqlDriver extends NObject implements DibiDriverInterface
|
||||
public function free()
|
||||
{
|
||||
mysql_free_result($this->resultset);
|
||||
$this->resultset = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -297,6 +297,7 @@ class DibiMySqliDriver extends NObject implements DibiDriverInterface
|
||||
public function free()
|
||||
{
|
||||
mysqli_free_result($this->resultset);
|
||||
$this->resultset = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -279,6 +279,7 @@ class DibiOdbcDriver extends NObject implements DibiDriverInterface
|
||||
public function free()
|
||||
{
|
||||
odbc_free_result($this->resultset);
|
||||
$this->resultset = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -272,6 +272,7 @@ class DibiOracleDriver extends NObject implements DibiDriverInterface
|
||||
public function free()
|
||||
{
|
||||
oci_free_statement($this->resultset);
|
||||
$this->resultset = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -140,14 +140,14 @@ class DibiPostgreDriver extends NObject implements DibiDriverInterface
|
||||
{
|
||||
if ($sequence === NULL) {
|
||||
// PostgreSQL 8.1 is needed
|
||||
$res = $this->query("SELECT LASTVAL() AS seq");
|
||||
$has = $this->query("SELECT LASTVAL() AS seq");
|
||||
} else {
|
||||
$res = $this->query("SELECT CURRVAL('$sequence') AS seq");
|
||||
$has = $this->query("SELECT CURRVAL('$sequence') AS seq");
|
||||
}
|
||||
|
||||
if (is_resource($res)) {
|
||||
$row = pg_fetch_assoc($res);
|
||||
pg_free_result($res);
|
||||
if ($has) {
|
||||
$row = $this->fetch();
|
||||
$this->free();
|
||||
return $row['seq'];
|
||||
}
|
||||
|
||||
@@ -277,6 +277,7 @@ class DibiPostgreDriver extends NObject implements DibiDriverInterface
|
||||
public function free()
|
||||
{
|
||||
pg_free_result($this->resultset);
|
||||
$this->resultset = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user