September 2010
Intermediate to advanced
440 pages
9h 23m
English
In programs that interface with multiple databases or otherwise persist beyond the database connection that you have initiated, you will find a need to use a couple of MySQL commands that we have not yet discussed: close and commit.
When one is finished with a database, it is good practice to close the cursor proxy. This ensures the cursor is not used again to refer to that database connection and also frees up resources. To close a cursor connection in MySQL for Python, simply issue the method call to your cursor object:
cur.close()
If you are experienced with using the MySQL shell or perhaps programming interfaces with MySQL using different APIs, you may wonder what has ...
Read now
Unlock full access