Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Re: [carfac] Adding A Date Range to Categories

Quote Reply
Re: [carfac] Adding A Date Range to Categories In reply to
You could do this with a global. Something like this (change date to the name of your column):

sub {
my $id=shift;
my $db=$DB->table('Links','CatLinks');
$db->select_options('Order by date desc','limit 1');
my $lastdate=$db->select(['date'],{CategoryID=>$id})->fetchrow_array;
$db->select_options('Order by date asc','limit 1');
my $firstdate=$db->select(['date'],{CategoryID=>$id})->fetchrow_array;
my $output = "($firstdate - $lastdate)";
return $output;
}
Subject Author Views Date
Thread Adding A Date Range to Categories carfac 1474 Mar 1, 2005, 10:34 AM
Thread Re: [carfac] Adding A Date Range to Categories
afinlr 1406 Mar 1, 2005, 11:20 AM
Post Re: [afinlr] Adding A Date Range to Categories
webmaster33 1405 Mar 1, 2005, 11:54 AM