mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-30 07:48:56 +00:00

Continue conversion to new reference template. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@178300 c90b9560-bf6c-de11-be94-00142212c4b1
89 lines
2.2 KiB
XML
89 lines
2.2 KiB
XML
<?xml version='1.0' encoding='iso-8859-1'?>
|
|
<!-- $Revision: 1.4 $ -->
|
|
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
|
|
<refentry id="function.PDO-lastInsertId">
|
|
<refnamediv>
|
|
<refname>PDO::lastInsertId</refname>
|
|
<refpurpose>
|
|
Returns the ID of the last inserted row
|
|
</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>int</type><methodname>PDO::lastInsertId</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
|
|
&warn.experimental.func;
|
|
<note>
|
|
<para>
|
|
Due to differences between database server implementations, this method
|
|
may not always return a meaningful result.
|
|
</para>
|
|
</note>
|
|
</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.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<!-- Use when examples exist
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Retrieving the last insert ID</title>
|
|
<para>
|
|
The following example demonstrates how to use the
|
|
<function>PDO::lastInsertID</function> method to retrieve the row
|
|
identifier for the last row that has been inserted into the database.
|
|
</para>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
if ($anexample === true) {
|
|
echo 'Use the PEAR Coding Standards';
|
|
}
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
Use the PEAR Coding Standards
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
-->
|
|
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|