Jump to content
Larry Ullman's Book Forums

Recommended Posts

I'm implementing a MySql transaction.

Do I have to issue this autocommit first?

 

mysqli_autocommit($dbc, FALSE);
 

And if I do that I need to set it true after the transaction?

There are not any other database queries on that page after the transaction.

Link to comment
Share on other sites

You don't have to set it to true after the transaction, but if you do in fact want to commit the transaction (i.e., the series of DB queries) then you need to execute the mysqli_commit function (http://www.php.net/manual/en/mysqli.commit.php) after all of the queries have been properly executed.

You can also use the mysqli_rollback function as necessary.

  • Upvote 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...