When you have alot of transactions to make, say you are applying inserting items to the database from a loop, it will be better to use the mysqli_commit for this kind of process as it will only hit the database once. //Wrong way Example 1: $con = mysqli_connect(“host”, “username”, “password”, “database”) or die(“Could not establish connection to database”); $users = [“chris”, “james”, “peter”, “mark”, “joe”, “alice”, “bob”] for($i=0; $i

By admin