mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
PDO-lastInsertID() returns last value of sequence object.
Document PDOStatement-closeCursor(). git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@190331 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
a5bb3ee605
commit
adf6aa4296
3 changed files with 156 additions and 5 deletions
|
@ -1,11 +1,11 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- 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
|
||||
Returns the ID of the last inserted row or sequence value
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
|
@ -18,7 +18,7 @@
|
|||
&warn.experimental.func;
|
||||
|
||||
<para>
|
||||
Returns the ID of the last inserted row, or the next value from a
|
||||
Returns the ID of the last inserted row, or the last value from a
|
||||
sequence object.
|
||||
</para>
|
||||
<note>
|
||||
|
@ -56,7 +56,7 @@
|
|||
<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
|
||||
string representing the last value retrieved from the specified sequence
|
||||
object.
|
||||
</para>
|
||||
<para>
|
||||
|
|
145
reference/pdo/functions/PDOStatement-closeCursor.xml
Normal file
145
reference/pdo/functions/PDOStatement-closeCursor.xml
Normal file
|
@ -0,0 +1,145 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- Generated by xml_proto.php v2.2. Found in /scripts directory of phpdoc. -->
|
||||
<refentry id="function.PDOStatement-closeCursor">
|
||||
<refnamediv>
|
||||
<refname>PDOStatement::closeCursor</refname>
|
||||
<refpurpose>
|
||||
Closes the cursor, enabling the statement to be executed again.
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>PDOStatement::closeCursor</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
|
||||
&warn.experimental.func;
|
||||
|
||||
<para>
|
||||
<function>PDOStatement::closeCursor</function> frees up the connection
|
||||
to the server so that other queries may be issued, but leaves the
|
||||
statement in a state that enables it to be executed again.
|
||||
</para>
|
||||
<para>
|
||||
This is implemented either as an optional driver specific method (allowing
|
||||
for maximum efficiency), or as the generic PDO fallback if no driver
|
||||
specific function is installed.
|
||||
</para>
|
||||
<para>
|
||||
The PDO generic fallback is semantically the same as writing the following
|
||||
code in your PHP script:
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
do {
|
||||
while ($stmt->fetch())
|
||||
;
|
||||
if (!$stmt->nextRowset())
|
||||
break;
|
||||
} while (true);
|
||||
]]>
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<!-- Use when EXCEPTIONS exist
|
||||
<refsect1 role="exceptions">
|
||||
&reftitle.exceptions;
|
||||
<para>
|
||||
When does this function throw exceptions?
|
||||
</para>
|
||||
</refsect1>
|
||||
-->
|
||||
|
||||
|
||||
<!-- Use when a CHANGELOG exists
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>Enter the PHP version of change here
|
||||
<entry>Description of change
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
-->
|
||||
|
||||
|
||||
<!-- Use when examples exist
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>A <function>PDOStatement::closeCursor</function> example</title>
|
||||
<para>
|
||||
Any text that describes the purpose of the example, or
|
||||
what goes on in the example should go here (inside the
|
||||
<example> tag, not out
|
||||
</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>
|
||||
-->
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>PDOStatement::execute</function></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.23 $ -->
|
||||
<!-- $Revision: 1.24 $ -->
|
||||
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
|
||||
<reference id="ref.pdo">
|
||||
<title>PDO Functions</title>
|
||||
|
@ -324,6 +324,12 @@ bash# echo extension=pdo.so >> /usr/local/php5/lib/php.ini
|
|||
- binds a PHP variable to a parameter in the prepared statement
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<link linkend='function.PDOStatement-closeCursor'>closeCursor</link>
|
||||
- closes the cursor, allowing the statement to be executed again
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<link linkend='function.PDOStatement-columnCount'>columnCount</link>
|
||||
|
|
Loading…
Reference in a new issue