cvs: phpdoc-it /reference/oci8/functions ocicommit.xml
| From: | Marco Cucinato | Date: | Fri, 29 Nov 2002 00:04:07 +0000 |
| Subject: | cvs: phpdoc-it /reference/oci8/functions ocicommit.xml | ||
| Groups: | php.doc.it | ||
| Request: | Send a blank email to doc-it+get-159@lists.php.net to get a copy of this message | ||
cucinato Thu Nov 28 19:04:07 2002 EDT
Modified files:
/phpdoc-it/reference/oci8/functions ocicommit.xml
Log:
Sync with EN version
Index: phpdoc-it/reference/oci8/functions/ocicommit.xml
diff -u phpdoc-it/reference/oci8/functions/ocicommit.xml:1.2
phpdoc-it/reference/oci8/functions/ocicommit.xml:1.3
--- phpdoc-it/reference/oci8/functions/ocicommit.xml:1.2 Wed Apr 17 03:07:40 2002
+++ phpdoc-it/reference/oci8/functions/ocicommit.xml Thu Nov 28 19:04:07 2002
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- splitted from ./it/functions/oci8.xml, last change in rev 1.1 -->
<!-- last change to 'ocicommit' in en/ tree in rev 1.2 -->
-<!-- EN-Revision: 1.2 Maintainer: cucinato Status: ready -->
+<!-- EN-Revision: 1.3 Maintainer: cucinato Status: ready -->
<!-- OLD-Revision: 1.45/EN.1.2 -->
<refentry id="function.ocicommit">
<refnamediv>
@@ -11,13 +11,49 @@
<refsect1>
<title>Descrizione</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> esegue tutte le transazioni in sospeso
sulla connessione Oracle <parameter>connection</parameter>.
+ &return.success;
</para>
+ <para>
+ Questo esempio dimostra l'utilizzo di OCICommit.
+ <example>
+ <title>OCICommit</title>
+ <programlisting>
+<![CDATA[
+<?php
+ // Login sul server Oracle
+ $conn = OCILogon('scott', 'tiger');
+
+ // Parse SQL
+ $stmt = OCIParse($conn, "INSERT INTO impiegati (nome, cognome) VALUES
('Massimo', 'Carlotti')");
+
+ // Esecuzione dello statement
+ OCIExecute($stmt);
+
+ // Commit della transazione
+ $committed = OCICommit($conn);
+
+ // Valuta se la commit ha funzionata. Se c'e' un errore, restituisce il messaggio di
errore
+ if(!$committed) {
+ $error = OCIError($conn);
+ echo 'Commit fallito. Oracle ha restituito: ' . $error['message'];
+ }
+
+ // Chiusura della connessione
+ OCILogoff($conn);
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ <simpara>
+ Vedere anche <function>OCIRollback</function>.
+ </simpara>
</refsect1>
</refentry>