python mysqldb multiple cursors for one connection

坚强是说给别人听的谎言 提交于 2019-11-30 17:26:56

You'll need to open multiple connections. Mysqldb is threadsafe, so each connection will be able to access their respective cursors, queries and result sets without having an effect on the other connections but each thread or process will need its own connection.

Below Code worked for me,

database = MySQLdb.connect(...)
curs = database.cursor()
curs1 = database.cursor()
curs2 = database.cursor()
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!