我试图在一个python文件中发送两个sql(select和update)。但仍然有错误
cursor = cnx.cursor()
query = "select id, mail from `candidats`; UPDATE candidats SET statusmail=1 "
results = cursor.execute(query, multi=True)
for cur in results:
print('cursor:', cur)
print('result:', cur.fetchall())
cursor.close()
cnx.close()
获取此错误:
mysql.connector.errors.InterfaceError: No result set to fetch from
暂无答案!
目前还没有任何答案,快来回答吧!