dblayeroo: PgSQL crash if the LastInsertID is called on table without autoincrement field. Return 1 in this particular case

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3917 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2017-09-04 13:14:47 +00:00
parent f0d5255321
commit 1b40529501

View File

@@ -2860,6 +2860,12 @@ class dblayeroo
} }
if ($autoInc !== null) if ($autoInc !== null)
$autoInc = $this->table."_${col}_seq"; $autoInc = $this->table."_${col}_seq";
else
{
$this->debugLog ("INSERT: PgSQL INSERT without Autoincrement. ".
"Return 1");
return 1;
}
} }
$this->debugLog ("INSERT: lastInsertId=", $this->debugLog ("INSERT: lastInsertId=",
self::$instance[$this->dsn]->lastInsertId ($autoInc)); self::$instance[$this->dsn]->lastInsertId ($autoInc));