Hello,
I'm trying to define a proc returning an ns_set, i.e. via set args [ns_set create].
This works fine for where I'm only to return one value from my queries, but I'm having problems getting instances of multiple rows returned in my adp's.
I've tried, namely: db_multirow pre_reqs pre_reqs_sql { }
Where pre_reqs_sql: select method from assessment where unit_code = :unit;
(Returning a list of assessment routines, given a course of study).
When trying to call this value back in my respective *.tcl, I get the error that the multirow-ed variable cannot be read, or it does not return any rows (although it does, as I call it with the multiple tag in my adp, using the same query in the tcl layer and it works fine).
I've looked through the documentation of upvar and uplevel, but am not entirely sure this method would be the right approach - although it looks as though I'd be heading that way, short of keeping all queries and multirow-ed attributes purely in my respective *.adp, *.tcl and *.xql files.
I have also tried db_list to set the return value and, while it works, the formatting isn't what I'm after (for the display view to be put in a course book format).
Any help would be greatly appreciated, as to whether I'm using the right approach, etc.
Cheers