Looping through results (generated by traversing to result object)
Hi, I don't know if anybody can help me but my problem is as follows: I have managed to set-up a Z SQL query which display results (using http://localhost:8080/sql_method/id/12/viewresult), but I have to explicitly embed the fields returned from the Z SQL query. I would like instead to loop over all the fields returned from the Z SQL and dynamically generate my report for the record. I think it should be something like <dtml-in data_passed_in>..etc Any help is much appreciated. Kieran
Kieran Walshe writes:
I have managed to set-up a Z SQL query which display results (using http://localhost:8080/sql_method/id/12/viewresult), but I have to explicitly embed the fields returned from the Z SQL query.
I would like instead to loop over all the fields returned from the Z SQL and dynamically generate my report for the record. I think it should be something like <dtml-in data_passed_in>..etc
Z SQL results have a method "names". It returns the sequence of field names in the result.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> Bah! Yet another person that does not read instructions!
Dieter
participants (2)
-
Dieter Maurer -
Kieran Walshe