This method sends a
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 that modifies data for
tables that use transactional storage engines.
>>> cursor.execute("INSERT INTO employees (first_name) VALUES (%s)", ('Jane')) >>> cnx.commit()
To roll back instead and discard modifications, see the rollback() method.
Copyright © 2012, 2014, Oracle and/or its affiliates. All rights reserved. Legal Notices