From 2fa8c0f10f8a8c3ecc8f3778a933ef3bb575f94c Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Sat, 26 Apr 2025 18:12:47 +0200 Subject: PHPDoc --- drivers/adodb-postgres64.inc.php | 12 ++++++++++-- 1 file 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); -- cgit v1.3