OK...lets see if I have it now... :)
# Displays the newest links on the home page.
my ($output,$sth,$link);
my $cat = shift;
my $search_db = $DB->table('CatLinks', 'Links');
$search_db->select_options ('ORDER BY Add_Date DESC Limit 5');
$sth = $search_db->select ( {isNew => 'Yes', isValidated => 'Yes', CategoryID => $cat });
while ($link = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display ('link1', $link);
}
return $output;
}
Code:
sub { # Displays the newest links on the home page.
my ($output,$sth,$link);
my $cat = shift;
my $search_db = $DB->table('CatLinks', 'Links');
$search_db->select_options ('ORDER BY Add_Date DESC Limit 5');
$sth = $search_db->select ( {isNew => 'Yes', isValidated => 'Yes', CategoryID => $cat });
while ($link = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display ('link1', $link);
}
return $output;
}