mysqli_autocommit
mysqli->auto_commit
Turns on or off auto-commiting database modifications
Description
Procedural style:
boolmysqli_autocommit
objectlink
boolmode
Object oriented style (method)
mysqli
bool
auto_commit
boolmode
mysqli_autocommit is used to turn on or off auto-commit mode
on queries for the database connection represented by the link
object.
mysqli_autocommit doesn't work with non transactional
table types (like MyISAM or ISAM).
To determine the current state of autocommit use the SQL command
'SELECT @@autocommit'.
Return values
&return.success;
See also
mysqli_commit,
mysqli_rollback.
Example
Object oriented style
autocommit(TRUE);
if ($result = $mysqli->query("SELECT @@autocommit")) {
$row = $result->fetch_row();
printf("Autocommit is %s\n", $row[0]);
$result->free();
}
/* close connection */
$mysqli->close();
?>
]]>
Procedural style
]]>