ad_db_optionlist db sql { default " " }What it does:
Produces an optionlist using results from a database query. The first selected column should contain the optionlist items. The second selected column should contain the optionlist values.Defined in: /web/philip/packages/acs-core/widgets-procs.tcl
Source code:
set retval "" set selection [ns_db select $db $sql] while { [ns_db getrow $db $selection] } { set item [ns_set value $selection 0] set value [ns_set value $selection 1] if { $value == $default } { append retval "<option SELECTED value=\"$value\">$item\n" } else { append retval "<option value=\"$value\">$item\n" } } return $retval