Modified: phpdoc/en/trunk/reference/oci8/functions/oci-commit.xml =================================================================== --- phpdoc/en/trunk/reference/oci8/functions/oci-commit.xml 2009-11-16 23:32:45 UTC (rev 290850) +++ phpdoc/en/trunk/reference/oci8/functions/oci-commit.xml 2009-11-17 00:19:18 UTC (rev 290851) @@ -3,7 +3,7 @@ oci_commit - Commits outstanding statements + Commits the outstanding database transaction @@ -13,9 +13,24 @@ resourceconnection - Commits all outstanding statements for the active transaction on the - Oracle connection. + Commits the outstanding transaction for the + Oracle connection. A commit ends the + current transaction and makes permanent all changes. It releases + all locks held. + + A transaction begins when the first SQL statement that changes data + is executed with oci_execute using + the OCI_NO_AUTO_COMMIT flag. Further data + changes made by other statements become part of the same + transaction. Data changes made in a transaction are temporary + until the transaction is committed or rolled back. Other users of + the database will not see the changes until they are committed. + + + Using transactions is recommended for relational data consistency + and for performance reasons. + @@ -26,8 +41,8 @@ connection - An Oracle connection identifier, returned by - oci_connect or oci_pconnect. + An Oracle connection identifier, returned by + oci_connect, oci_pconnect, or oci_new_connect. @@ -50,37 +65,36 @@ ]]> @@ -95,17 +109,33 @@ Transactions are automatically rolled back when you close the connection, or when the script ends, whichever is soonest. You need to explicitly call oci_commit to commit - the transaction, or oci_rollback to abort it. + the transaction. + + Any call to oci_execute that uses + OCI_COMMIT_ON_SUCCESS mode explicitly or by default will commit + any previous uncommitted transaction. + + + Any Oracle DDL statement such as CREATE or DROP will automatically + commit any uncommitted transaction. + + + + In PHP versions before 5.0.0 you must + use ocicommit + instead. &oci.name.compat.note; + + &reftitle.seealso; + oci_execute oci_rollback - oci_execute Modified: phpdoc/en/trunk/reference/oci8/functions/oci-rollback.xml =================================================================== --- phpdoc/en/trunk/reference/oci8/functions/oci-rollback.xml 2009-11-16 23:32:45 UTC (rev 290850) +++ phpdoc/en/trunk/reference/oci8/functions/oci-rollback.xml 2009-11-17 00:19:18 UTC (rev 290851) @@ -3,7 +3,7 @@ oci_rollback - Rolls back outstanding transaction + Rolls back the outstanding database transaction @@ -13,9 +13,24 @@ resourceconnection - Rolls back all outstanding statements for the Oracle - connection. + Reverts all uncommitted changes for the Oracle + connection and ends the transaction. It + releases all locks held. All Oracle SAVEPOINTS + are erased. + + A transaction begins when the first SQL statement that changes data + is executed with oci_execute using + the OCI_NO_AUTO_COMMIT flag. Further data + changes made by other statements become part of the same + transaction. Data changes made in a transaction are temporary + until the transaction is committed or rolled back. Other users of + the database will not see the changes until they are committed. + + + Using transactions is recommended for relational data consistency + and for performance reasons. + @@ -26,8 +41,9 @@ connection - An Oracle connection identifier, returned by - oci_connect or oci_pconnect. + An Oracle connection identifier, returned by + oci_connect, oci_pconnect + or oci_new_connect. @@ -42,22 +58,99 @@ + + &reftitle.examples; + + + <function>oci_rollback</function> example + + +]]> + + + + + + Rolling back to a <literal>SAVEPOINT</literal> example + + + + + + + &reftitle.notes; - Transactions are automatically rolled back when you close - the connection, or when the script ends, whichever is soonest. You + Transactions are automatically rolled back when you close the + connection, or when the script ends, whichever is soonest. You need to explicitly call oci_commit to commit - the transaction, or oci_rollback to abort it. + the transaction. + + Any call to oci_execute that uses + OCI_COMMIT_ON_SUCCESS mode explicitly or by default will commit + any previous uncommitted transaction. + + + Any Oracle DDL statement such as CREATE or DROP will automatically + commit any uncommitted transaction. + - In PHP versions before 5.0.0 you must use ocirollback instead. - This name still can be used, it was left as alias of - oci_rollback for downwards compatability. - This, however, is deprecated and not recommended. + In PHP versions before 5.0.0 you must + use ocirollback + instead. &oci.name.compat.note; @@ -67,6 +160,7 @@ oci_commit + oci_execute