Newest link date:
Code:
sub {
my ($output,$sth);
my $link_db = $DB->table('Links');
$link_db->select_options ('ORDER BY Add_Date DESC Limit 1');
$sth = $link_db->select ( { isValidated => 'Yes' } );
while ($link = $sth->fetchrow_hashref) {
$output = $link->{Add_Date};
}
return $output;
}
Oldest link date:
Code:
sub {
my ($output,$sth);
my $link_db = $DB->table('Links');
$link_db->select_options ('ORDER BY Add_Date ASC Limit 1');
$sth = $link_db->select ( { isValidated => 'Yes' } );
while ($link = $sth->fetchrow_hashref) {
$output = $link->{Add_Date};
}
return $output;
}
This is just a help point, where you can start developing the exact features you need.
If you want the 2 globals together, you can merge them and return oldest link and newest link, also you can add date formatting (I did not added date formatting by default).
Also the newest link value is available per category in Category table.
You just need to go though all categories and take the highest newest link dates.
I hope this helps you starting in good direction.
Best regards,
Webmaster33
Paid Support from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...