On Fri, 19 Jun 2009 15:46:46 +0100
jorma kala <jjk...@gmail.com> wrote:

> Is there a way of retrieving the value of columns in the rows returned by
> fetchall, by column name instead of index on the row?

Try this:

  db = MySQLdb.Connection(host=host,user=user,passwd=passwd,db=database)
  db.query(query)
  result = db.store_result()
  data = result.fetch_row(maxrows=0, how=1)

-- 
Mike Kazantsev // fraggod.net

Attachment: signature.asc
Description: PGP signature

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to