Possible Duplicate:
Python: use mysqldb to import a MySQL table as a dictionary?
I currently get the db entry in the form of array using the commands
db_conn = mdb.connect(host = "localhost", user = "username", passwd = "password", db = "db_name", charset='utf8')
cursor = db_conn.cursor()
cursor.execute(sql_query)
rows = cursor.fetchall()
I get the row values in the form of array. Can I get in the form of dictionary with column names as keys. I couldn't find any such command.