Forum OpenACS Development: Re: Better support for the <tcl> tag in templating

Collapse
Posted by Don Baccus on
Remember to use -extend to make the variables you set visible to the template ...
db_multirow -extend foo_plus_bar stuff get_stuff {select foo, bar from fubar} {
    set foo_plus_bar [expr {$foo+$bar}]
    set invisible ""
}
In this example "foo_plus_bar" will be placed into the array made visible to your template, while "invisible" will not.

I think it was Lars that added this to db_multirow ...

As to why rownum's part of the array ... why not? :)