Forum OpenACS Development: Re: Re: Problem with using db_multirow in <package>-procs.tcl

Collapse
Posted by Jon Suen on
Thanks for your help.
Are you saying -multirow_name "varname" is defined in a separate code block to the rest?

At the moment my understanding of the syntax for procs generally is:

ad_proc -public processname {
{-parameters_passed_in:required,etc.}
} { Documentation
} {

# Code block (main body for the procedure)

return $args
# for example

}

Is this correct? I'm just not entirely clear on where
{-multirow_name "varname"}
would fit in, if not within the main body.

I'll give it a go all the same, thanks again.

Jon

At present I have:

{ -multirow_name "prs" }


{ upvar $prs prs

db_multirow prs pre_reqs_sql { }
}

### And I define pre_reqs_sql to return a multirow-ed
### value in the according package-procs.xql file.

This currently spits up a request error:
[snip]
invalid command name "-multirow_name "prs""
[/snip]

Which I didn't really expect to work all the same, since I'm not sure about the placement of the -multirow_name switch...

Any help would be greatly appreciated

Cheeres