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 3923 Mar 12, 2005, 12:49 PM
Thread Re: [rascal] Should it be in a Loop
Andy 3797 Mar 14, 2005, 2:20 AM
Thread Re: [Andy] Should it be in a Loop
rascal 3746 Mar 14, 2005, 8:52 PM
Thread Re: [rascal] Should it be in a Loop
Andy 3739 Mar 14, 2005, 11:22 PM
Thread Re: [Andy] Should it be in a Loop
rascal 3713 Mar 15, 2005, 7:05 AM
Thread Re: [rascal] Should it be in a Loop
rascal 3761 Mar 15, 2005, 8:22 AM
Thread Re: [rascal] Should it be in a Loop
Andy 3739 Mar 15, 2005, 10:14 AM
Thread Re: [Andy] Should it be in a Loop
rascal 3723 Mar 15, 2005, 10:52 AM
Thread Re: [rascal] Should it be in a Loop
Andy 3703 Mar 15, 2005, 12:27 PM
Thread Re: [Andy] Should it be in a Loop
rascal 3692 Mar 15, 2005, 9:40 PM
Post Re: [rascal] Should it be in a Loop
rascal 3625 May 10, 2005, 10:02 PM
Post Re: [Andy] Should it be in a Loop
brewt 3630 May 10, 2005, 10:36 PM