Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

generate full category list code

Quote Reply
generate full category list code
hello

I have the following in part of a script (not as a global) that I copied from another post in the forum. Problem is... its not working for me - returns nothing to the page. Can anyone see any problem with it?

Code:

my $cat_db = $DB->table('Category');
$cat_db->select_options ("ORDER BY Full_Name DESC");
my $sth = $cat_db->select ();
my $output .= "<select name='catid'>";
while (my $cat = $sth->fetchrow_hashref) {
$output .= "<option value='$cat->{ID}'>$cat->{Name}</option>";
}
my $output .= "</select>";
print "$output";

thank

r

Last edited by:

ryel01: Aug 8, 2004, 3:50 AM
Subject Author Views Date
Thread generate full category list code ryel01 1430 Aug 8, 2004, 3:49 AM
Thread Re: [ryel01] generate full category list code
Andy 1370 Aug 9, 2004, 1:05 AM
Post Re: [Andy] generate full category list code
ryel01 1365 Aug 9, 2004, 1:08 AM