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

Re: [nir] Same level category

Quote Reply
Re: [nir] Same level category In reply to
This one might work

Code:
sub {

my $cid=shift;

my $csth = $DB->table('Category')->select({ID => $cid});
my $crec = $csth->fetchrow_hashref();

my $db = $DB->table ('Category');
$db->select_options('ORDER BY Name DESC');
my $sth = $db->select ( { FatherID => $crec->{FatherID} });

my @cats;

while (my $cat = $sth->fetchrow_array)
{
unless ($cat->{ID} == $cid)
{
push @cats, $cat;
}
}

return {more_cats_loop=>\@cats};

}


Sacrifice is not about what you lose,
it is about what you gain in the process.
Subject Author Views Date
Thread Same level category nir 4540 Sep 29, 2009, 4:05 AM
Thread Re: [nir] Same level category
Andy 4505 Sep 29, 2009, 5:14 AM
Thread Re: [Andy] Same level category
nir 4477 Sep 29, 2009, 5:55 AM
Thread Re: [nir] Same level category
Andy 4468 Sep 29, 2009, 6:31 AM
Post Re: [Andy] Same level category
nir 4467 Sep 29, 2009, 6:47 AM
Thread Re: [nir] Same level category
EZFrag 4459 Sep 29, 2009, 6:48 AM
Thread Re: [EZFrag] Same level category
nir 4477 Sep 29, 2009, 7:03 AM
Thread Re: [nir] Same level category
Andy 4493 Sep 29, 2009, 7:08 AM
Thread Re: [Andy] Same level category
EZFrag 4463 Sep 29, 2009, 7:17 AM
Thread Re: [EZFrag] Same level category
Andy 4466 Sep 29, 2009, 7:18 AM
Post Re: [Andy] Same level category
nir 4447 Sep 29, 2009, 7:22 AM