That seems to be good.
You can confirm ?
-------------
sub {
my $id = shift;
my $catid = $DB->table('CatLinks')->select({LinkID=>$id})->fetchrow_hashref->{CategoryID};
my $db = $DB->table('CatLinks','Links');
$db->select_options ('ORDER BY hits DESC', 'LIMIT 1');
my $cond = GT::SQL::Condition->new(
'CatLinks.CategoryID','=',$catid,
'CatLinks.LinkID','<>',$id);
my $rs = $db->select($cond,['Links.*'])->fetchall_hashref or return;
my $output ="...";
foreach(@$rs){
$output .= Links::SiteHTML::display('link',$_);
}
return $output;
}
-----------------------
Thank you for your answer.
You can confirm ?
-------------
sub {
my $id = shift;
my $catid = $DB->table('CatLinks')->select({LinkID=>$id})->fetchrow_hashref->{CategoryID};
my $db = $DB->table('CatLinks','Links');
$db->select_options ('ORDER BY hits DESC', 'LIMIT 1');
my $cond = GT::SQL::Condition->new(
'CatLinks.CategoryID','=',$catid,
'CatLinks.LinkID','<>',$id);
my $rs = $db->select($cond,['Links.*'])->fetchall_hashref or return;
my $output ="...";
foreach(@$rs){
$output .= Links::SiteHTML::display('link',$_);
}
return $output;
}
-----------------------
Thank you for your answer.