in reply to Re: Re: Re: popup_menu from database
in thread popup_menu from database

thank you to everyone, I got it to work. Here is how I did it...
%cat_options = Admin_Get_Cat_options_hash(); # Here is Admin_Get_Cat_options_hash code: sub Admin_Get_Cat_options_hash { my %options_list; $sth = $dbh->prepare (qq{ SELECT id,c_name FROM categories }); $sth->execute(); while (my ($id,$c_name) = $sth->fetchrow_array()) { $options_list{$id} = $c_name; } $sth->finish(); return(%options_list); }
That worked.
Thanks for the idea to have it in a sub, dws

thx,
Richard