dbs             Wed Mar  9 18:29:35 2005 EDT

  Modified files:              
    /phpdoc/en/reference/pdo/functions  PDO-lastInsertId.xml 
  Log:
  Take a stab at documenting this based on PDO 0.3 beta release notes.
  An actual test case would be nice :)
  
  
http://cvs.php.net/diff.php/phpdoc/en/reference/pdo/functions/PDO-lastInsertId.xml?r1=1.4&r2=1.5&ty=u
Index: phpdoc/en/reference/pdo/functions/PDO-lastInsertId.xml
diff -u phpdoc/en/reference/pdo/functions/PDO-lastInsertId.xml:1.4 
phpdoc/en/reference/pdo/functions/PDO-lastInsertId.xml:1.5
--- phpdoc/en/reference/pdo/functions/PDO-lastInsertId.xml:1.4  Wed Jan 26 
09:41:31 2005
+++ phpdoc/en/reference/pdo/functions/PDO-lastInsertId.xml      Wed Mar  9 
18:29:35 2005
@@ -1,5 +1,5 @@
 <?xml version='1.0' encoding='iso-8859-1'?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
 <!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. 
-->
   <refentry id="function.PDO-lastInsertId">
    <refnamediv>
@@ -11,11 +11,16 @@
    <refsect1 role="description">
     <title>Description</title>
     <methodsynopsis>
-     <type>int</type><methodname>PDO::lastInsertId</methodname>
-     <void/>
+     <type>string</type><methodname>PDO::lastInsertId</methodname>
+     <methodparam 
choice="opt"><type>string</type><parameter>name</parameter></methodparam>
     </methodsynopsis>
 
-     &warn.experimental.func;
+    &warn.experimental.func;
+
+    <para>
+     Returns the ID of the last inserted row, or the next value from a
+     sequence object.
+    </para>
     <note>
      <para>
       Due to differences between database server implementations, this method
@@ -24,13 +29,39 @@
     </note>
    </refsect1>
 
+   <refsect1 role="parameters">
+    &reftitle.parameters;
+    <para>
+     <variablelist>
+      <varlistentry>
+       <term><parameter>name</parameter></term>
+       <listitem>
+        <para>
+         Name of the sequence object from which the ID should be returned.
+        </para>
+       </listitem>
+      </varlistentry>
+     </variablelist>
+    </para>
+   </refsect1>
+
    <refsect1 role="returnvalues">
     &reftitle.returnvalues;
     <para>
-     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, <function>PDO::lastInsertID</function> issues a PDOWarning
-     exception.
+     If a sequence name was not specified for the <parameter>name</parameter>
+     parameter, <function>PDOStatement::lastInsertId</function> returns a
+     string representing the row ID of the last row that was inserted into
+     the database.
+    </para>
+    <para>
+     If a sequence name was specified for the <parameter>name</parameter>
+     parameter, <function>PDOStatement::lastInsertId</function> returns a
+     string representing the next value retrieved from the specified sequence
+     object.
+    </para>
+    <para>
+     If the PDO driver does not support this capability,
+     <function>PDO::lastInsertID</function> issues a PDOWarning exception.
     </para>
    </refsect1>
 

Reply via email to