mysql Unread result found
cursor = cnx.cursor(buffered=True)
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()
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us