Gossamer Forum
Home : Products : Gossamer Links : Discussions :

category Depth 1 or 2

Quote Reply
category Depth 1 or 2
IO have a global that is picking up links for my home page.
It is currently set to pick up links with CatDepth => 1,
I want it to pick up for all Category depths except 0, that is 1, 2, 3 and as much as i will have later on .

this is how it looks now,

my $sth = $tbl->select( { CatDepth => 1 } ) || die $GT::SQL::error;

I tried

my $sth = $tbl->select( { CatDepth => 2 } ) || die $GT::SQL::error;

and will only pick up categories with depth 2

can any one help me
Quote Reply
Re: [Dorette] category Depth 1 or 2 In reply to
Hi,

Try this:

Code:
my $sth = $tbl->select( GT::SQL::Condition->new('CatDepth','>','2') ) || die $GT::SQL::error;

Hope that helps.

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] category Depth 1 or 2 In reply to
Sorry Andy
it is not picking up any links at all.

Last edited by:

Dorette: Sep 22, 2007, 6:38 AM
Quote Reply
Re: [Dorette] category Depth 1 or 2 In reply to
Hi,

Try:


Code:
$sth = $tbl->select( GT::SQL::Condition->new('CatDepth','>=','2') ) || die $GT::SQL::error:;

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] category Depth 1 or 2 In reply to
Thanks Andy,
i tried and it is listing only links with cat depth 2 no more ones with cat depth1
Quote Reply
Re: [Dorette] category Depth 1 or 2 In reply to
Hi,

Just try this then ;

Code:
$sth = $tbl->select( GT::SQL::Condition->new('CatDepth','>','0') ) || die $GT::SQL::error;

All you need to do was edit the > bit :P

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates

Last edited by:

Andy: Sep 23, 2007, 3:30 AM
Quote Reply
Re: [Andy] category Depth 1 or 2 In reply to
Might need to remove the colon infront of the semicolon though Cool
Quote Reply
Re: [Wychwood] category Depth 1 or 2 In reply to
Well spotted =) (I wrote that code after hitting my middle finger with a hammer last weekend, so was a bit careful how I typed :D)

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] category Depth 1 or 2 In reply to
hi Wychwood,
thanks, I did take it off but did not work

Andy
I figured out how to make it work later on

my $sth = $tbl->select( GT::SQL::Condition->new('CatDepth','<=','2') ) || die $GT::SQL::error;
Quote Reply
Re: [Dorette] category Depth 1 or 2 In reply to
Hi,

Quote:
my $sth = $tbl->select( GT::SQL::Condition->new('CatDepth','<=','2') ) || die $GT::SQL::error;

Erm, but that will get CatDepth LESS THAN or EQUAL to 2 ? (I thought you said you didn't want to get CatDepth=0 ?)

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] category Depth 1 or 2 In reply to
Quote:
I want it to pick up for all Category depths except 0, that is 1, 2, 3 and as much as i will have later on .

No Andy,
I wanted 1 and up
Thank you
Dorette
Quote Reply
Re: [Dorette] category Depth 1 or 2 In reply to
Well, in that case, this won't work ;)

Code:
my $sth = $tbl->select( GT::SQL::Condition->new('CatDepth','<=','2') ) || die $GT::SQL::error;

..You need:

Code:
my $sth = $tbl->select( GT::SQL::Condition->new('CatDepth','>','0') ) || die $GT::SQL::error;

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates