I would like to show a header only if there is any links from this sub.
Does this need to be in a loop, if it does how do you do it.
sub {
my ($id,$search_db,$output,$sth,$link);
$id = shift;
$search_db = $DB->table('Links','CatLinks');
$search_db->select_options ("ORDER BY rand()");
$sth = $search_db->select ({xxx => 'Yes', isValidated => 'Yes', CategoryID=>$id});
while ($link = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display ('xxx', $link);
}
return $output;
}
Thanks everyone for all your help!
Does this need to be in a loop, if it does how do you do it.
sub {
my ($id,$search_db,$output,$sth,$link);
$id = shift;
$search_db = $DB->table('Links','CatLinks');
$search_db->select_options ("ORDER BY rand()");
$sth = $search_db->select ({xxx => 'Yes', isValidated => 'Yes', CategoryID=>$id});
while ($link = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display ('xxx', $link);
}
return $output;
}
Thanks everyone for all your help!