Index: openacs-4/packages/acs-templating/tcl/query-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/query-procs.tcl,v diff -u -r1.17 -r1.17.2.1 --- openacs-4/packages/acs-templating/tcl/query-procs.tcl 1 Nov 2003 08:45:37 -0000 1.17 +++ openacs-4/packages/acs-templating/tcl/query-procs.tcl 26 Nov 2003 15:02:44 -0000 1.17.2.1 @@ -638,7 +638,7 @@
returns the columns in the datasource
template::multirow get datasourcename rownum [column]
returns the row of of data (or the particular row/column if column is provided)
-
template::multirow get datasourcename rownum column value
+
template::multirow set datasourcename rownum column value
set an element value
template::multirow foreach datasource code
evaluate code block for each row (like db_foreach)
Index: openacs-4/packages/acs-templating/tcl/util-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/util-procs.tcl,v diff -u -r1.16.2.1 -r1.16.2.2 --- openacs-4/packages/acs-templating/tcl/util-procs.tcl 24 Nov 2003 12:41:55 -0000 1.16.2.1 +++ openacs-4/packages/acs-templating/tcl/util-procs.tcl 26 Nov 2003 15:02:44 -0000 1.16.2.2 @@ -411,15 +411,19 @@ @param level How many levels up the stack to place the new datasource, defaults to 1 level up. } { - upvar $level $var_name:rowcount rowcount + upvar $level $var_name:rowcount rowcount $var_name:columns columns set rowcount [llength $rows] set i 1 foreach row_set $rows { + ns_set put $row_set rownum $i upvar $level $var_name:$i row array set row [util_ns_set_to_list -set $row_set] + if {$i == 1} { + set columns [array names row] + } incr i } }