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

Products: Gossamer Links: Development, Plugins and Globals: Re: [Matthias70] Sorting: Edit Log

Here is the list of edits for this post
Re: [Matthias70] Sorting
Try this:

Code:
sub {
my $category = $DB->table('Category');
$category->select_options('ORDER BY Name');
my $sth = $category->select( ['Has_New_Links','Number_of_Links','Name','Full_Name'], GT::SQL::Condition->new('FatherID','>','0','CatDepth','=','1') );
my @cats;
while (my $cat = $sth->fetchrow_hashref) {
$cat->{URL} = $category->as_url($cat->{Full_Name}) . "/$CFG->{build_index}";
push @cats, $cat;
}
return { new_categories => \@cats };
}

Hope that helps.

Cheers

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!

Last edited by:

Andy: Apr 13, 2008, 1:28 PM

Edit Log: