dblayeroo: pgsql doesn't supports lastInsertId if there is no autoincrement field
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3919 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -2767,6 +2767,8 @@ class dblayeroo
|
|||||||
$sql = $this->createRequest ();
|
$sql = $this->createRequest ();
|
||||||
if ($this->driver === "pgsql" && $this->command === "INSERT")
|
if ($this->driver === "pgsql" && $this->command === "INSERT")
|
||||||
{
|
{
|
||||||
|
// PgSQL doesn't support the lastInsertId if there is no autoincrement
|
||||||
|
// field. Will return the primary key
|
||||||
$sql .= " RETURNING ".$this->sep.$this->primary.$this->sep;
|
$sql .= " RETURNING ".$this->sep.$this->primary.$this->sep;
|
||||||
}
|
}
|
||||||
$this->debugLog ("Entering prepareRequest (XXX, ",false,")");
|
$this->debugLog ("Entering prepareRequest (XXX, ",false,")");
|
||||||
|
|||||||
Reference in New Issue
Block a user