Gossamer Forum
Quote Reply
Should it be in a Loop
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!
Subject Author Views Date
Thread Should it be in a Loop rascal 3658 Mar 12, 2005, 12:49 PM
Thread Re: [rascal] Should it be in a Loop
Andy 3535 Mar 14, 2005, 2:20 AM
Thread Re: [Andy] Should it be in a Loop
rascal 3486 Mar 14, 2005, 8:52 PM
Thread Re: [rascal] Should it be in a Loop
Andy 3477 Mar 14, 2005, 11:22 PM
Thread Re: [Andy] Should it be in a Loop
rascal 3453 Mar 15, 2005, 7:05 AM
Thread Re: [rascal] Should it be in a Loop
rascal 3499 Mar 15, 2005, 8:22 AM
Thread Re: [rascal] Should it be in a Loop
Andy 3477 Mar 15, 2005, 10:14 AM
Thread Re: [Andy] Should it be in a Loop
rascal 3463 Mar 15, 2005, 10:52 AM
Thread Re: [rascal] Should it be in a Loop
Andy 3441 Mar 15, 2005, 12:27 PM
Thread Re: [Andy] Should it be in a Loop
rascal 3432 Mar 15, 2005, 9:40 PM
Post Re: [rascal] Should it be in a Loop
rascal 3365 May 10, 2005, 10:02 PM
Post Re: [Andy] Should it be in a Loop
brewt 3370 May 10, 2005, 10:36 PM