Thomas Apostolou wrote at 2005-9-19 13:43 +0100:
>i use the following to get to show the results from an
>sql query.
>What are the expresions to show the field names?
The ZSQL method result has a method "names" returning the
field names.
You can use it in a "dtml-let", similar to:
<dtml-let
result="TestODBCEM(....)"
field_names="result.names()"
>
<dtml-in result prefix=row>
<dtml-in field_names prefix=field>
<dtml-var field_item> <!-- the field name -->
<dtml-var expr="_[field_item]"> <!-- its value -->
....
--
Dieter
_______________________________________________
Zope maillist - [email protected]
http://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )