Gossamer Forum
Quote Reply
hey Laura
I'm using one of your globals posted long time ago, one thing i need help in is how come it won't work when i change the sort order. i changed to ORDER BY Title or anything else but dun work!?

sub {
my $tags = shift;
my $cat_id = $tags->{'ID'};
my $name = $tags->{'Name'};
my $link_db = $DB->table('Links','CatLinks');
$link_db->select_options ("ORDER BY $CFG->{build_sort_order_category}");
my $sth = $link_db->select ( { CategoryID => $cat_id, isValidated => 'Yes' });

my $output = qq~ <b>$name:</b><br> ~;

while (my $link = $sth->fetchrow_hashref) {
$output .= qq~ <li>$link->{'Title'} ~;
}

my $cat_db = $DB->table('Category');
my $sth2 = $cat_db->select ( ['ID','Name'],{ FatherID => $cat_id });

while (my ($child_id,$subname) = $sth2->fetchrow_array){
$output .= qq~ <br><br><b>$subname:</b><br> ~;

my $sth3 = $link_db->select ( { CategoryID => $child_id, isValidated => 'Yes' });

while (my $link2 = $sth3->fetchrow_hashref) {
$output .= qq~ <li>$link2->{'Title'} ~;
}
}

return $output;
}
Subject Author Views Date
Thread hey Laura xpert 4098 Nov 13, 2002, 9:45 PM
Post Re: [xpert] hey Laura
Andy 3976 Nov 14, 2002, 1:19 AM
Thread Re: [xpert] hey Laura
afinlr 3966 Nov 14, 2002, 1:43 PM
Thread Re: [afinlr] hey Laura
xpert 3955 Nov 14, 2002, 2:09 PM
Thread Re: [xpert] hey Laura
afinlr 3946 Nov 14, 2002, 2:24 PM
Thread Re: [afinlr] hey Laura
xpert 3963 Nov 14, 2002, 2:53 PM
Post Re: [xpert] hey Laura
afinlr 3948 Nov 14, 2002, 3:05 PM
Thread Re: [xpert] hey Laura
afinlr 3952 Nov 14, 2002, 3:13 PM
Post Re: [afinlr] hey Laura
xpert 3914 Nov 14, 2002, 4:05 PM