-
Book Overview & Buying
-
Table Of Contents
PHP Oracle Web Development: Data processing, Security, Caching, XML, Web Services, and Ajax
By :
So far, you have seen a few simple examples that showed the basics of how Oracle transactions work in PHP. This section takes you through more complex examples of using transactions in PHP/Oracle applications.
As you learned from the examples discussed earlier in this chapter, the oci_execute function allows you to execute an SQL statement in one of two modes—OCI_COMMIT_ON_SUCCESS mode and OCI_DEFAULT mode.
While statements are automatically committed when run in the OCI_COMMIT_ON_SUCCESS mode, you have to explicitly call oci_commit or oci_rollback to commit or roll back the transaction respectively, when specifying the OCI_DEFAULT mode.
However, it is interesting to note that a transaction created when a statement is executed in the OCI_DEFAULT mode may still be committed without calling oci_commit. To accomplish this, all you need to do is to execute a subsequent statement in the OCI_COMMIT_ON_SUCCESS mode.
The above technique...
Change the font size
Change margin width
Change background colour