From fdce87115736d44cf8fb9f63c1a37eb71dc141f1 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Mon, 4 Sep 2017 13:46:20 +0000 Subject: [PATCH] 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 --- dblayeroo.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dblayeroo.php b/dblayeroo.php index 9447287..d0349d2 100644 --- a/dblayeroo.php +++ b/dblayeroo.php @@ -2767,6 +2767,8 @@ class dblayeroo $sql = $this->createRequest (); 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; } $this->debugLog ("Entering prepareRequest (XXX, ",false,")");