[Zope] How to access column names in DTML Methods

Jose Soares jose@sferacarta.com
Tue, 14 Nov 2000 14:27:42 +0100


Great!
Thank you very much Curtis.


Curtis Maloney wrote:

> On Tue, 14 Nov 2000, Jose Soares wrote:
> > Hi all,
> >
> > I'm trying to display the column names of a Record object without success.
> > I'm able to access column data using sequence-item but I don't know
> > how to display column names.
> >
> >
>
> Here is some code I use in a production site:
>
> <dtml-let Fields="sqlQuery().names()">
>   <dtml-in Fields>
>     do your loop stuff here
>   </dtml-in>
> </dtml-let>
>
> I only used the dtml-let because I use the list twice... so;
>
> <dtml-in "sqlQuery().names()">
>   blah
> </dtml-in>
>
> should work fine (not testsed.)  I believe there is some more detail in what
> exactly is in an SQL return object (try the ZQR :)
>
> >
> > Thanks for any help
> > José
> >
>
> Have a better one,
>         Curtis Maloney
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )