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.12 -r1.13 --- openacs-4/packages/acs-templating/tcl/query-procs.tcl 30 Nov 2002 17:24:15 -0000 1.12 +++ openacs-4/packages/acs-templating/tcl/query-procs.tcl 17 May 2003 10:05:27 -0000 1.13 @@ -629,6 +629,8 @@
appends the row to an existing multirow.
template::multirow size datasourcename
returns the rowcount
+
template::multirow columns datasourcename
+
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
@@ -694,10 +696,18 @@ size { upvar $multirow_level_up $name:rowcount rowcount if { [template::util::is_nil rowcount] } { - error "malformed multirow datasource - $name" + return 0 } return $rowcount } + + columns { + upvar $multirow_level_up $name:columns columns + if { [template::util::is_nil columns] } { + return {} + } + return $columns + } get { @@ -750,6 +760,10 @@ upvar $multirow_level_up $name:rowcount rowcount $name:columns columns + if {![info exists rowcount] || ![info exists columns]} { + return + } + for { set i 1 } { $i <= $rowcount } { incr i } { # Pull values into variables (and into the array - aks), # evaluate the code block, and pull values back out to