Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [SkuZZy] How can I list the "5 newest links"?

Quote Reply
Re: [SkuZZy] How can I list the "5 newest links"? In reply to
Something like this

sub {
# Displays the newest links on the home page.
my ($output,$sth,$link);
my $search_db = $DB->table('Links');
$search_db->select_options ('ORDER BY Add_Date DESC Limit 5');
$sth = $search_db->select ( { isValidated => 'Yes' });
while ($link = $sth->fetchrow_hashref) {

$link->{category} = $DB->table('CatLinks','Category')->select(['Full_Name'],{LinkID => $link->{ID}});
if (length $link->{Description} > 220) {
$link->{Description} = substr($link->{Description}, 0, 220) . '...';
}
$output .= Links::SiteHTML::display ('new_links', $link);
}
return $output;
}

Last edited by:

afinlr: May 13, 2003, 8:32 AM
Subject Author Views Date
Thread How can I list the "5 newest links"? SkuZZy 4479 May 12, 2003, 6:11 PM
Thread Re: [SkuZZy] How can I list the "5 newest links"?
pugdog 4349 May 12, 2003, 6:19 PM
Thread Re: [pugdog] How can I list the "5 newest links"?
SkuZZy 4389 May 12, 2003, 6:43 PM
Thread Re: [SkuZZy] How can I list the "5 newest links"?
afinlr 4322 May 13, 2003, 5:40 AM
Thread Re: [afinlr] How can I list the "5 newest links"?
SkuZZy 4357 May 13, 2003, 8:09 AM
Thread Re: [SkuZZy] How can I list the "5 newest links"?
afinlr 4327 May 13, 2003, 8:31 AM
Thread Re: [afinlr] How can I list the "5 newest links"?
SkuZZy 4352 May 13, 2003, 8:48 AM
Thread Re: [SkuZZy] How can I list the "5 newest links"?
SkuZZy 4345 May 13, 2003, 8:49 AM
Thread Re: [SkuZZy] How can I list the "5 newest links"?
afinlr 4310 May 13, 2003, 2:32 PM
Thread Re: [afinlr] How can I list the "5 newest links"?
gundamz 4265 Dec 21, 2003, 12:03 AM
Thread Re: [gundamz] How can I list the "5 newest links"?
gundamz 4231 Dec 21, 2003, 12:31 AM
Post Re: [gundamz] How can I list the "5 newest links"?
DogTags 4244 Dec 22, 2003, 7:26 AM