2004-11-10 22:21:24 +00:00
|
|
|
<?xml version='1.0' encoding='iso-8859-1'?>
|
2005-02-05 18:52:58 +00:00
|
|
|
<!-- $Revision: 1.2 $ -->
|
2004-11-10 22:21:24 +00:00
|
|
|
<!-- 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>
|
2005-02-05 18:52:58 +00:00
|
|
|
|
|
|
|
<refsect1 role="description">
|
|
|
|
&reftitle.description;
|
2004-11-10 22:21:24 +00:00
|
|
|
<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>
|
2005-02-05 18:52:58 +00:00
|
|
|
|
|
|
|
<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>
|
|
|
|
|
|
|
|
|
2004-11-10 22:21:24 +00:00
|
|
|
</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
|
|
|
|
-->
|