mysqli_autocommit
mysqli->autocommit
Turns on or off auto-commiting database modifications
Description
Procedural style:
boolmysqli_autocommit
mysqlilink
boolmode
Object oriented style (method)
mysqli
boolautocommit
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'.
&reftitle.returnvalues;
&return.success;
&reftitle.seealso;
mysqli_commit&listendand;
mysqli_rollback.
&reftitle.examples;
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
]]>
&example.outputs;