Thanks, that works great. One minor detail, the rows() returns case- insensitive output (actually lower-case letters). While in my MySQL tables/columns defined in case-mixed case. But according to docs, case-mixed feature are in alpha development. Just a request/suggestion, it would be nice to follow a convention of what has been defined in DB.
Valentin. On Feb 26, 1:02 pm, "King Simon-NFHD78" <[EMAIL PROTECTED]> wrote: > Also, the rows that you get back from a 'select' are instances of > RowProxy, so you can use row.keys() to get the names even after column > labels have been applied. > > http://www.sqlalchemy.org/docs/docstrings.myt#docstrings_sqlalchemy.engi > ne_RowProxy > > Simon > > > -----Original Message----- > > From: sqlalchemy@googlegroups.com > > [mailto:[EMAIL PROTECTED] On Behalf Of Jonathan Ellis > > Sent: 26 February 2007 17:51 > > To: sqlalchemy@googlegroups.com > > Subject: [sqlalchemy] Re: how to get column names in result > > > You can see what columns are part of a table (or a select!) with > > .columns.keys() or .c.keys(). > > > On 2/24/07, vkuznet <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > a very simple question which I cannot find in documentation. How to > > > get column names together with result. This is useful for web > > > presentation of results using templates. I used use_labels=True, > > > indeed it construct query with names, but my final result contains > > > only column values. What I wanted is to get as a first row > > the column > > > names. > > > > Thanks, > > > Valentin. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---