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 5089 Mar 12, 2005, 12:49 PM
Thread Re: [rascal] Should it be in a Loop
Andy 4936 Mar 14, 2005, 2:20 AM
Thread Re: [Andy] Should it be in a Loop
rascal 4878 Mar 14, 2005, 8:52 PM
Thread Re: [rascal] Should it be in a Loop
Andy 4878 Mar 14, 2005, 11:22 PM
Thread Re: [Andy] Should it be in a Loop
rascal 4845 Mar 15, 2005, 7:05 AM
Thread Re: [rascal] Should it be in a Loop
rascal 4894 Mar 15, 2005, 8:22 AM
Thread Re: [rascal] Should it be in a Loop
Andy 4878 Mar 15, 2005, 10:14 AM
Thread Re: [Andy] Should it be in a Loop
rascal 4856 Mar 15, 2005, 10:52 AM
Thread Re: [rascal] Should it be in a Loop
Andy 4841 Mar 15, 2005, 12:27 PM
Thread Re: [Andy] Should it be in a Loop
rascal 4824 Mar 15, 2005, 9:40 PM
Post Re: [rascal] Should it be in a Loop
rascal 4758 May 10, 2005, 10:02 PM
Post Re: [Andy] Should it be in a Loop
brewt 4762 May 10, 2005, 10:36 PM