Oh, it shows many, many... links to "cat 50".
What did I make wrong?
I have insert this:
my $cat = $_[0];
my $db_obj = $DB->table('Category');
$db_obj->select_options ('ORDER BY Full_Name DESC');
my $sth = $db_obj->select ( FatherID => $_[0] ) || die $GT::SQL::error;
my @cats;
while (my $hit = $sth->fetchrow_hashref) {
$hit->{URL} = $CFG->{build_root_url} . "/" . $DB->table('Category')->as_url( $hit->{Full_Name} ) . "/" . $CFG->{build_index};
push @cats, $hit;
}
return { cats_loop => \@cats }
}in:
get_cats_in_other
Knubbel
What did I make wrong?
I have insert this:
Code:
sub { my $cat = $_[0];
my $db_obj = $DB->table('Category');
$db_obj->select_options ('ORDER BY Full_Name DESC');
my $sth = $db_obj->select ( FatherID => $_[0] ) || die $GT::SQL::error;
my @cats;
while (my $hit = $sth->fetchrow_hashref) {
$hit->{URL} = $CFG->{build_root_url} . "/" . $DB->table('Category')->as_url( $hit->{Full_Name} ) . "/" . $CFG->{build_index};
push @cats, $hit;
}
return { cats_loop => \@cats }
}
get_cats_in_other
Knubbel