Forum OpenACS Development: Response to Passing a multirow to template::adp_parse?

Collapse
Posted by Jun Yamog on
Hi Ola,

I am unsure what you want to do. But this might help..

On you proc make an upvar

ad_proc get_foo {
   upvar package_key_foo package_key_foo
   db_multirow package_key_foo get_items "SQL"
}

Call get_foo on your tcl, then on your adp file you can now do

<multiple name="package_key_foo">
@package_key_foo.bar@
</multiple>
Another alternate is using db_list_of_lists on your proc, get result on a list, then convert the list using this. You can see the discussion here on how to use it.

Although you should only use the list of lists thingy if your proc is something that is reused on other stuff. The upvar and multirow combo is simpler. Sorry if this is out of context... my head is really fuzzy this days... too much code craming.