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

cursors, and add an example of how to use scrollable cursors (finally!). Add examples for the transaction functions. Correct a typo in the constants. Adopt more reference template goodness throughout. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@178958 c90b9560-bf6c-de11-be94-00142212c4b1
82 lines
1.9 KiB
XML
82 lines
1.9 KiB
XML
<?xml version='1.0' encoding='iso-8859-1'?>
|
|
<!-- $Revision: 1.2 $ -->
|
|
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
|
|
<refentry id="function.PDO-commit">
|
|
<refnamediv>
|
|
<refname>PDO::commit</refname>
|
|
<refpurpose>
|
|
Commits a transaction
|
|
</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>PDO::commit</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
&warn.experimental.func;
|
|
<para>
|
|
Commits a transaction, returning the database connection to autocommit
|
|
mode until the next call to <function>PDO::beginTransaction</function>
|
|
starts a new transaction.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example><title>Commit a transaction</title>
|
|
<programlisting role='php'>
|
|
<![CDATA[
|
|
<?php
|
|
/* Begin a transaction, turning off autocommit */
|
|
$dbh->beginTransaction();
|
|
|
|
/* Change the database schema */
|
|
$sth = $dbh->exec("DROP TABLE fruit");
|
|
|
|
/* Commit the changes */
|
|
$dbh->commit();
|
|
|
|
/* Database connection is now back in autocommit mode */
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>PDO::beginTransaction</function></member>
|
|
<member><function>PDO::rollBack</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
|
|
-->
|