Thomas Apostolou wrote:
Hello all,
i use the following to get to show the results from an
sql query.
What are the expresions to show the field names?

  <dtml-in expr="TestODBCEM(sysDSN=sysDSN, usr=usr,
mypass=mypass, sSQL=sSQL)">
    <dtml-if sequence-even>
      <tr bgcolor="lightgreen">
    <dtml-in sequence-item>
      <td><dtml-var sequence-item></td>
</tr> </dtml-in>

You can ask the Results object 'names()' to get the names of the columns of your results. Note you need to ask the results list, not an individual result, so you'll need to define "TestODBCEM(sysDSN=sysDSN, usr=usr, mypass=mypass, sSQL=sSQL)" as something so as to ask it for names and loop over it later.


"Building Websites with Plone"

Enfold Systems, LLC
Zope maillist  -
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to