I'm using the following code to retrieve certain links to be used in a page built by pagebuilder.
I would like to order the links alphabetically and by date added. What would I need to add to the global to do that?
Thanks
CCUnet
my $table = $DB->table('Links');
my $sth = $table->select( { isPriority => '1' } ) or return "Error: $GT::SQL::error";
my ($link,$hit,$output);
while (my $hit = $sth->fetchrow_hashref) { $link = $table->select ('*', { ID => $hit->{ID} })->fetchrow_hashref;
$output .= Links::SiteHTML::display ('link', $link);
}
return $output; }my Christian web
I would like to order the links alphabetically and by date added. What would I need to add to the global to do that?
Thanks
CCUnet
Code:
sub { my $table = $DB->table('Links');
my $sth = $table->select( { isPriority => '1' } ) or return "Error: $GT::SQL::error";
my ($link,$hit,$output);
while (my $hit = $sth->fetchrow_hashref) { $link = $table->select ('*', { ID => $hit->{ID} })->fetchrow_hashref;
$output .= Links::SiteHTML::display ('link', $link);
}
return $output; }