neighbor_summary_items_approved category_idWhat it does:
returns list of Tcl lists; each list contains a subcategory ID, subcategory_1 name and a count; we expect this to be memoizedDefined in: /web/philip/tcl/neighbor-defs.tcl
Source code:
set db [ns_db gethandle subquery] set selection [ns_db select $db "select sc.subcategory_id, sc.subcategory_1, count(n.neighbor_to_neighbor_id) as count from neighbor_to_neighbor n, n_to_n_subcategories sc where n.category_id = $category_id and n.subcategory_id = sc.subcategory_id and n.approved_p='t' group by sc.subcategory_id, sc.subcategory_1 order by sc.subcategory_1"] set return_list [list] while {[ns_db getrow $db $selection]} { set_variables_after_query lappend return_list [list $subcategory_id $subcategory_1 $count] } ns_db releasehandle $db return $return_list