You can ignore links without a description by adding a condition line:
my $condition = GT::SQL::Condition->new( 'Description', 'IS NOT', \'NULL','isValidated','=','Yes');
Add it below your select option line.
And then you can add $condition into both lines which select from the Links database
$sth = $link_db->select ( $condition ,{ CategoryID => $cat_id });
and
my $sth3 = $link_db->select ( $condition, { CategoryID => $child_id});
Paul - I think that you need to resort the array because otherwise you will always get links from the main category or the first subcategory - the new links are just added on the end of the array as the code goes down the list of subcategories, so if you want to give the links in the last subcategory a chance of appearing I think you need this extra sort?
The UK High Street
my $condition = GT::SQL::Condition->new( 'Description', 'IS NOT', \'NULL','isValidated','=','Yes');
Add it below your select option line.
And then you can add $condition into both lines which select from the Links database
$sth = $link_db->select ( $condition ,{ CategoryID => $cat_id });
and
my $sth3 = $link_db->select ( $condition, { CategoryID => $child_id});
Paul - I think that you need to resort the array because otherwise you will always get links from the main category or the first subcategory - the new links are just added on the end of the array as the code goes down the list of subcategories, so if you want to give the links in the last subcategory a chance of appearing I think you need this extra sort?
The UK High Street