Hi,
Sorry about the late reply! You have some syntax errors in your code. Try:
my $tags = shift;
my $id = $tags->{Category_ID};
my $table = $DB->table('catalog', 'catalog_sub_category');
$table->select_options ('ORDER BY Sub_Category');
my $sth = $table->select ([\"DISTINCT catalog.Sub_Category_ID", Sub_Category], { Category_ID => $category_ID });
my $output;
my $num;
while (my $row = $sth->fetchrow_hashref) {
$num = $num + 1;
($output .= "<font face=\"verdana,arial,helvetica\" size=\"-2\" color=red>$num.</font> <font face=\"verdana,arial,helvetica\" size=\"-2\"><a href=db.cgi?&sid=$tags->{session_id}>$row->{Sub_Category}</a></font><br><br>\n");
}
return $output;
}
Looks like it should work.
Cheers,
Alex
--
Gossamer Threads Inc.
Sorry about the late reply! You have some syntax errors in your code. Try:
Code:
sub { my $tags = shift;
my $id = $tags->{Category_ID};
my $table = $DB->table('catalog', 'catalog_sub_category');
$table->select_options ('ORDER BY Sub_Category');
my $sth = $table->select ([\"DISTINCT catalog.Sub_Category_ID", Sub_Category], { Category_ID => $category_ID });
my $output;
my $num;
while (my $row = $sth->fetchrow_hashref) {
$num = $num + 1;
($output .= "<font face=\"verdana,arial,helvetica\" size=\"-2\" color=red>$num.</font> <font face=\"verdana,arial,helvetica\" size=\"-2\"><a href=db.cgi?&sid=$tags->{session_id}>$row->{Sub_Category}</a></font><br><br>\n");
}
return $output;
}
Looks like it should work.
Cheers,
Alex
--
Gossamer Threads Inc.