31 May
2000
31 May
'00
9:22 p.m.
Adam Molyneaux writes:
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 >
If "sqlListTable" is a SQLMethod, you get the sequence of result column names by: "sqlListTable(table_name='personnel').names()" If, e.g., you want list the first column of your result set, this could be done as follows: <dtml-let q="sqlListTable(table_name='personnel')" field1= "q.names()[0]"> <dtml-in q> <dtml-with sequence-item> <dtml-var field1>: <dtml-var "_[field1]"><br> </dtml-with> </dtml-in> </dtml-let> Dieter