Gossamer Forum
Quote Reply
global help
Hi Andy,
I need a check if the link is validated in many of my globals
for expample this one
Code:
sub {
my (@links,$sth,$link);
my $search_db = $DB->table('Links','Reviews');
$search_db->select_options ("ORDER BY Review_Date DESC","LIMIT $_[0]");
$sth = $search_db->select ( { Review_Validated => 'Yes' });
while (my $link = $sth->fetchrow_hashref()) {
if (length $link->{Title} > 70) {
$link->{Title} = substr($link->{Title}, 0, 50) . '...';}
$link = Links::SiteHTML::tags('link', $link);
$link->{detailed_url} = $CFG->{build_detail_url} . "/" . $DB->table('Links')->detailed_url( $link->{ID} );
push@links, $link;
}
return {Latest_Revs=>\@links};<br>
}

Can you tell me, where and how a can add a check "if the links is validated"???
Means, I don't want to show a review, if the link is not validated...
Thanks

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] global help In reply to
Try changing:

Code:
$sth = $search_db->select ( { Review_Validated => 'Yes' });

..to:

Code:
$sth = $search_db->select ( { isValidated => "Yes" } , { Review_Validated => 'Yes' });

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] global help In reply to
Thanks, works perfect :-)

Matthias
gpaed.de