Gossamer Forum
Quote Reply
Modify Random Global
Hello all,

I used this global to show Three Random Links:

sub {
my $link_db = $DB->table('Links');
my $total = $link_db->count ( { isValidated => 'Yes' });
my $output;
for (1 .. 3) {
my $rand = int (rand() * $total);
$link_db->select_options ("LIMIT $rand, 1");
my $sth = $link_db->select ({ isValidated => 'Yes' });
my $link = $sth->fetchrow_hashref;
$output .= Links::SiteHTML::display ('link', $link);
}
return $output;
}

Now I will modify these global to show only Links which the Datafield "Termin" ist greater than 00.00.0000 .
The Datafield has the Format DD.MM.YYYY
I used this on the Detail Page like:

<%if Termin eq '00.00.0000'%>Still no new date admits<%else%><%Termin%><%endif%>

Who can help me ??

Thanks from Germany,
qix
Quote Reply
Re: [qix] Modify Random Global In reply to
Is there Nobody who can help me Unsure

Greets,
qix
Quote Reply
Re: [qix] Modify Random Global In reply to
Hi,

Not sure really what you're asking for?

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!