void setAutoCommit(
boolean
$bit)
|
|
Enable/disable automatic commits.
Pushes SQLWarning onto $warnings stack if the autocommit value is being changed mid-transaction. This function is overridden by driver classes so that they can perform the necessary begin/end transaction SQL.
If auto-commit is being set to TRUE, then the current transaction will be committed immediately.
Tags:
Overridden in child classes as:
- ODBCConnection::setAutoCommit()
Parameters:
This "magic" method is invoked upon serialize() and works in tandem with the __wakeup() method to ensure that your database connection is serializable.
This method returns an array containing the names of any members of your class which need to be serialized in order to allow the class to re-connect to the database when it is unserialized.
<p>
Developers:
Note that you cannot serialize resources (connection links) and expect them to be valid when you unserialize. For this reason, you must re-connect to the database in the __wakeup() method.
It's up to your class implimentation to ensure that the necessary data is serialized. You probably at least need to serialize:
(1) the DSN array used by connect() method (2) Any flags that were passed to the connection (3) Possibly the autocommit state
Tags: