Answers for "mysql connector unread result found"

1

mysql Unread result found

cursor = cnx.cursor(buffered=True)
Posted by: Guest on February-14-2021
0

mysql Unread result found

/* If you looping through cursor & running another query,python no like*/
/* Store results into list first then loop again running query*/
/* So something like this*/

results = list()
for (id,fname,lname) in cursor:
    results.append({"id":id,"fname":fname,"lname":lname})
    
for r in results:
	id=r['id']
    query = ("update user set fname='whatever' where id = "+str(id))
    cursor.execute(query)
    cnx.commit()
Posted by: Guest on April-01-2021

Code answers related to "mysql connector unread result found"

Browse Popular Code Answers by Language