[Zope] Column Names from SQL Query (was: Get Column Names from SQL Query?)

Thomas B. Passin tpassin@mitretek.org
Wed, 4 Apr 2001 18:32:38 -0400


I remember posting this before, but something seems to have eaten it.
Laurie Nason nailed it for me, many thanks Laurie.

Here is a summary of the result:

Given a ZSQL query named "query1", this DTML will execute the query and
display a list of the column names:

  <dtml-let results=query1>
   <dtml-var "results.names()">
  </dtml-let>

And here it is using dtml-with:

<dtml-with query1>
   <dtml-var "names()">
</dtml-with>

Thanks to all for the help.

Regards,

Tom P