[megoldva] PHP ora_commitoff => oci_???

Kaptam egy csodálatos feladatot, mégpedig azt hogy egy ősrégi PHP kódot, ami ora-n:
(http://www.phpwelt.net/handbuecher/hungarian/ref.oracle.html)
keresztül kommunikál az oracle-el írjam át oci8ra:
(http://www.phpwelt.net/handbuecher/hungarian/ref.oci8.html).Egész jól ment a dolog amíg nem ütköztem bele a következő kódrészletbe:


	function autoCommitOff() {
		$x = ora_commitoff($this->attr['conn']);
		$x = (null === $x) ? false : true;
		return $x;
	}

A többi részt aránylag egyszerűen sikerült átalakítani de erre nem találok megoldást, nincs oci_commitoff.

Tudtok erre valami megoldást?

Hozzászólások

How are database transactions handled in PHP?
When using the OCI Extension Module, PHP will commit whenever ociexecute() returns successfully. One can control this behavior by specifying OCI_COMMIT_ON_SUCCESS (the default) or OCI_DEFAULT as the second parameter to the ociexecute() function call. OCI_DEFAULT can be used to prevent statements from being auto-committed. The OCICommit() and OCIRollback() functions can then be used to control the transaction.

Note that when OCI_DEFAULT is used on any statement handle, it is inherited by the other statement handles for the connection. You cannot use a mix of autocommit/explicit commit on the same connection handle. If you want to do that, you need to use ociNLogon() to get a separate handle.

The ORA Extension Module supports an autocommit mode. Use the ORA_CommitOn() and ORA_CommitOff() functions to toggle between autocommit mode and normal mode. When in normal mode (ORA_CommitOff), you can use the ORA_Commit() and ORA_Rollback() functions to control transactions.

If you don't commit or roll back at the end of a script, PHP will do an implicit commit. This is consistent with the way SQL*Plus works.

http://download.oracle.com/otndocs/tech/ias/portal/files/RG/complete_we…

--
A gyors gondolat többet ér, mint a gyors mozdulat.