Hi,
Something like this out of my ULTRAGlobals plugin should do the trick:
Latest_New_Links
Code:
sub {
my $limit = $_[0] || 10;
my $table = $DB->table('Links');
$table->select_options ("ORDER BY ID DESC LIMIT $limit");
my $sth = $table->select( { isValidated => 'Yes', isNew => 'Yes' }) || die $GT::SQL::error;
my @output;
while (my $link = $sth->fetchrow_hashref) {
$link = Links::SiteHTML::tags('link', $link);
push @output, $link;
}
return { Latest_Links_Loop => \@output };
}
Just change this line so it doesn't require it to be isNew:
Code:
my $sth = $table->select( { isValidated => 'Yes' }) || die $GT::SQL::error;
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!