From af7c5f5ccb7b56456a9a78120f107c39e26ccfb1 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Wed, 9 Mar 2005 23:29:35 +0000 Subject: [PATCH] Take a stab at documenting this based on PDO 0.3 beta release notes. An actual test case would be nice :) git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@181734 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/pdo/functions/PDO-lastInsertId.xml | 47 ++++++++++++++++---- 1 file changed, 39 insertions(+), 8 deletions(-) diff --git a/reference/pdo/functions/PDO-lastInsertId.xml b/reference/pdo/functions/PDO-lastInsertId.xml index 0510b5a418..ed6e0a4848 100644 --- a/reference/pdo/functions/PDO-lastInsertId.xml +++ b/reference/pdo/functions/PDO-lastInsertId.xml @@ -1,5 +1,5 @@ - + @@ -11,11 +11,16 @@ Description - intPDO::lastInsertId - + stringPDO::lastInsertId + stringname - &warn.experimental.func; + &warn.experimental.func; + + + Returns the ID of the last inserted row, or the next value from a + sequence object. + Due to differences between database server implementations, this method @@ -24,13 +29,39 @@ + + &reftitle.parameters; + + + + name + + + Name of the sequence object from which the ID should be returned. + + + + + + + &reftitle.returnvalues; - Returns an integer representing the row ID of the last row that was - inserted into the database. If the PDO driver does not support this - capability, PDO::lastInsertID issues a PDOWarning - exception. + If a sequence name was not specified for the name + parameter, PDOStatement::lastInsertId returns a + string representing the row ID of the last row that was inserted into + the database. + + + If a sequence name was specified for the name + parameter, PDOStatement::lastInsertId returns a + string representing the next value retrieved from the specified sequence + object. + + + If the PDO driver does not support this capability, + PDO::lastInsertID issues a PDOWarning exception.