Home : Products : Gossamer Links : Development, Plugins and Globals :

Products: Gossamer Links: Development, Plugins and Globals: Re: [Alex] GROUP BY: Edit Log

Here is the list of edits for this post
Re: [Alex] GROUP BY
The following seems to work:

Code:
my %grp;
my $tab = $DB->table('MyLinks');
my @list = $tab->select( { UserID => $USER->{Username} } )->fetchall_list;
my $table = $DB->table('Links','CatLinks');

$table->select_options("LIMIT $low,$mh");

my $sth = $table->select( { ID => \@list } );
while (my $rec = $sth->fetchrow_hashref) {
push @{$grp{$rec->{CategoryID}}}, Links::SiteHTML::display('mylinks_link', $rec );
}

for (keys %grp) {
$tags->{saved_links} .= join '', @{$grp{$_}};
}

Last edited by:

Paul: Mar 19, 2002, 4:33 AM

Edit Log: