db = _mysql.connect (...)
db.query(...)
res = db.store_result()
a = res.fetch_row(maxrows = 1, how = 1) #in the documentation said that how = 1 return row as is dictionary
print a['id'] # TypeError: tuple indices must be integers
Maybe i don't understand something?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
db = _mysql.connect (...)
db.query(...)
res = db.store_result()
a = res.fetch_row(maxrows = 1, how = 1) #in the documentation said that how = 1 return row as is dictionary
print a['id'] # TypeError: tuple indices must be integers
Maybe i don't understand something?
Yeah. Start by reading PEP-249. Then read all of MySQLdb.txt from the documentation. If you're using _mysql, you didn't read far enough.