Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Date greater than ....

Quote Reply
Date greater than ....
hi,

this is my global:

sub {
my $link_db = $DB->table('Links','CatLinks');
my $date = GT::Date::date_get();

$link_db->select_options ("ORDER BY Add_Date DESC","LIMIT 2");
my $sth = $link_db->select ({isValidated => 'Yes',CategoryID => '4',Topeintrag => $date});

my $output;
while (my $link = $sth->fetchrow_hashref){
$output .= Links::SiteHTML::display ('top', $link);
}
return $output;
}

runs great but ...

but i need the selection Topeintrag < $ Date. In this global is Topeintrag = $date.

example (now is the 2003-11-26):

Topeintrag = 2003-11-28 -> Link show

Topeintrag = 2003-11-26 -> Link show

Topeintrag = 2003-11-25 -> Link donīt show.

have anybody an solution?

Thanks
Quote Reply
Re: [thinky] Date greater than .... In reply to
Not sure if this is what you mean?

my $sth = $link_db->select ({isValidated => 'Yes',CategoryID => '4'}, GT::SQL::Condition->new('Topeintrag','<=',$date));

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Date greater than .... In reply to
THANKS!!!!!!

my $sth = $link_db->select ({isValidated => 'Yes',CategoryID => '4'}, GT::SQL::Condition->new('Topeintrag','>=',$date));

is right!!!!!

Bye!