database_to_tcl_list db sqlWhat it does:
takes a query like "select product_id from foobar" and returns all the ids as a Tcl listDefined in: /web/philip/packages/acs-core/utilities-procs.tcl
Source code:
set selection [ns_db select $db $sql] set list_to_return [list] while {[ns_db getrow $db $selection]} { lappend list_to_return [ns_set value $selection 0] } return $list_to_return