This method sends the COMMIT statement to the
MySQL server, committing the current transaction. Since by
default, Connector/Python does not autocommit, it is important
to call this method after every transaction which updates data
for tables using transactional storage engines.
See the rollback() method for rolling back transactions.
>>> cursor.execute("INSERT INTO employees (first_name) VALUES (%s)", ('Jane'))
>>> cnx.commit()

User Comments
Add your own comment.