victorsubervi at gmail.com
Mon Nov 23 11:47:20 CET 2009
I have the following code:
user, passwd, db, host = login()
db = MySQLdb.connect(host, user, passwd, 'cart')
db = MySQLdb.connect(host, user, passwd, db)
Now, python complains about me opening a new connection. But I thought I'd
closed the first one! So, I replaced the last 3 lines with this:
cursor.execute('use %s;' % db)
but it didn't like that, either. Any way to switch databases?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list