cvs: phpdoc-zh /reference/oci8/functions ocicommit.xml

From: Date: Mon, 11 Nov 2002 02:38:53 +0000
Subject: cvs: phpdoc-zh /reference/oci8/functions ocicommit.xml
Groups: php.doc.zh 
Request: Send a blank email to doc-zh+get-863@lists.php.net to get a copy of this message
yincheng Sun Nov 10 21:38:53 2002 EDT Modified files: /phpdoc-zh/reference/oci8/functions ocicommit.xml Log: update to en version Index: phpdoc-zh/reference/oci8/functions/ocicommit.xml diff -u phpdoc-zh/reference/oci8/functions/ocicommit.xml:1.1 phpdoc-zh/reference/oci8/functions/ocicommit.xml:1.2 --- phpdoc-zh/reference/oci8/functions/ocicommit.xml:1.1 Sat Nov 9 01:32:17 2002 +++ phpdoc-zh/reference/oci8/functions/ocicommit.xml Sun Nov 10 21:38:52 2002 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: yincheng $ --> -<!-- EN-Revision: 1.2 Maintainer: yincheng Status: ready --> +<!-- EN-Revision: 1.5 Maintainer: yincheng Status: ready --> <!-- splitted from ./en/functions/oci8.xml, last change in rev 1.2 --> <refentry id="function.ocicommit"> <refnamediv> @@ -11,13 +11,49 @@ <refsect1> <title>ÃèÊö</title> <methodsynopsis> - <type>int</type><methodname>OCICommit</methodname> + <type>bool</type><methodname>OCICommit</methodname> <methodparam><type>int</type><parameter>connection</parameter></methodparam> </methodsynopsis> <para> -<function>OCICommit</function> Ìá½» Oracle Á¬½Ó <parameter>connection</parameter> +<function>OCICommit</function> Ìá½» Oracle Á¬½Ó <parameter>connection</parameter> ËùÓÐδִÐеÄÓï¾ä¡£ + &return.success; </para> + <para> + ÏÂÃæµÄÀý×Ó˵Ã÷ÁË OCICommit µÄÓ÷¨¡£ + <example> + <title>OCICommit</title> + <programlisting> +<![CDATA[ +<?php + // Login to Oracle server + $conn = OCILogon('scott', 'tiger'); + + // Parse SQL + $stmt = OCIParse($conn, "INSERT INTO employees (name, surname) VALUES ('Maxim', 'Maletsky')"); + + // Execute statement + OCIExecute($stmt); + + // Commit transaction + $committed = OCICommit($conn); + + // Test whether commit was successful. If error occurred, return error message + if(!$committed) { + $error = OCIError($conn); + echo 'Commit failed. Oracle reports: ' . $error['message']; + } + + // Close connection + OCILogoff($conn); +?> +]]> + </programlisting> + </example> + </para> + <simpara> + ²Î¼û <function>OCIRollback</function>¡£ + </simpara> </refsect1> </refentry>

« previous php.doc.zh (#863) next »