MySQLdb DictCursor scrambles field order

HW google at thegoldensun.com
Thu Aug 1 20:29:26 EDT 2002


Gerhard Haering <gerhard.haering at gmx.de> wrote in message 
> Just look into cursor.description. It can be used to get the fields in an
> ordered way.
> 
> Gerhard

Thank you!  This is exactly what I was looking for.


"Steve Holden" <sholden at holdenweb.com> wrote in message news:<Die29.182136$724.176388 at atlpnn01.usenetserver.com>...
> I'm not sure why you're trying to use a DictCursor when you don't appear to
> want to access the retrieved columns by name. A standard cursor will give
> you the columns in the order they were specified in the retrieval statement.
> 
> Your situation was the kind of thing I had in mund when I wrote
> 
>     http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/81189
> 
> which may or may not give you some useful hints.
> 
> regards
>  Steve

Very useful, thanks.
HW



More information about the Python-list mailing list