Im guessing that isn't right anyway as it only selects one link with the code I have and doesn't group. Time to visit mysql.com :(
my $cond = GT::SQL::Condition->new('Links.ID', 'IN', \@list);
my $tab = $DB->table('Links','CatLinks');
$tab->select_options("GROUP BY lsql_CatLinks.CategoryID");
my $sth = $tab->select( $cond );
while (my $rec = $sth->fetchrow_hashref) {
$tags->{saved_links} .= Links::SiteHTML::display('mylinks_link', $rec );
}
Code:
require GT::SQL::Condition; my $cond = GT::SQL::Condition->new('Links.ID', 'IN', \@list);
my $tab = $DB->table('Links','CatLinks');
$tab->select_options("GROUP BY lsql_CatLinks.CategoryID");
my $sth = $tab->select( $cond );
while (my $rec = $sth->fetchrow_hashref) {
$tags->{saved_links} .= Links::SiteHTML::display('mylinks_link', $rec );
}