diff options
Diffstat (limited to 'drivers/adodb-postgres64.inc.php')
| -rw-r--r-- | drivers/adodb-postgres64.inc.php | 12 |
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); |
