[Zope] How to access column names in DTML Methods
Curtis Maloney
curtis@cardgate.net
Tue, 14 Nov 2000 09:51:37 +1100
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