still trying to get field names from a query of the form
SELECT * FROM MYTABLE



><dtml-in "sqlListTable(table_name='personnel')">
>   <dtml-in sequence-item>
>      <P><dtml-var sequence_key>
></dtml-in >


doesnt seem to work

niether does the How To http://www.zope.org/Members/teyc/howtoSQLVariables
 assuming I have understood it correctly

ie.
    <dtml-let R="sqlListTable(table_name='personnel')">

   <dtml-in SQL.names>
     <dtml-let vname=sequence-item
               vvalue="SQL()[0][_['sequence-index']]">
        <dtml-var vname>,
        <dtml-var vvalue><br>
     </dtml-let>
   </dtml-in>
    </dtml-let>

FINALLY I have succeded in doing what I want by using an external method
which returns the list of fieldname !

ie.
def getFieldNames(self,res):
    fieldnames=res._schema.items()
    return fieldnames


I would still be interested in knowing how to do the job correctly.

adam
[EMAIL PROTECTED]





_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to