[Zope] field names of a database table
Thomas B. Passin
tpassin@mitretek.org
Thu, 26 Apr 2001 16:44:00 -0400
Jan Kubatzki asked
> how can i find out the field names of a table of a database ?
If you mean "how can my Zope code find out the column names of a table?", it
was covered on the list a week or two ago. Here is a summary of how I
suggested doing it (after some good help from the list):
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>
Tom P