You can call the mysql_commit() function to commit the current transaction.
Syntax
my_bool
mysql_commit(MYSQL *mysql)
Return values
0 is returned for a commit success, and a non-zero value is returned if an error occurred.
Errors
None.
Notes
The behavior of this function depends on the value of the completion_type system variable. If the value of completion_type is RELEASE or 2, after the transaction is terminated and the connection with the client is closed, the server will release the connection. You can call the mysql_close() function on the client to close the connection from the client side.