summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Regad <dregad@mantisbt.org>2025-04-26 18:12:47 +0200
committerDamien Regad <dregad@mantisbt.org>2025-05-01 13:47:18 +0200
commit2fa8c0f10f8a8c3ecc8f3778a933ef3bb575f94c (patch)
tree6d3bf87e527db34d33a955696bd9bf0bd4ea9e79
parent0774134f3311779495d16f74a35c872e353708c6 (diff)
downloadadodb-2fa8c0f10f8a8c3ecc8f3778a933ef3bb575f94c.tar.gz
adodb-2fa8c0f10f8a8c3ecc8f3778a933ef3bb575f94c.tar.bz2
adodb-2fa8c0f10f8a8c3ecc8f3778a933ef3bb575f94c.zip
PHPDoc
-rw-r--r--drivers/adodb-postgres64.inc.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/adodb-postgres64.inc.php b/drivers/adodb-postgres64.inc.php
index 5cbe77ed..5e144cd1 100644
--- a/drivers/adodb-postgres64.inc.php
+++ b/drivers/adodb-postgres64.inc.php
@@ -135,8 +135,16 @@ class ADODB_postgres64 extends ADOConnection{
return " coalesce($field, $ifNull) ";
}
- // get the last id - never tested
- function pg_insert_id($tablename,$fieldname)
+ /**
+ * Get the last inserted id.
+ *
+ * @param string $tablename
+ * @param string $fieldname
+ * @return int|false
+ *
+ * @noinspection PhpUnused
+ */
+ function pg_insert_id($tablename, $fieldname)
{
$sequence = pg_escape_identifier($this->_connectionID, $tablename .'_'. $fieldname .'_seq');
$result = pg_query($this->_connectionID, 'SELECT last_value FROM '. $sequence);