Gossamer Forum
Home : General : Perl Programming :

Select greater than...

Quote Reply
Select greater than...
Hi,

I'm modifying a global for Links SQL that selects records for the category table that has the following line:

my $sth = $cat_db->select ( {'FatherID' => 0, Cat_Include => 'Yes'},['Full_Name','Name'] );

I want to add one more condition where it will only select those records where the integer field called 'Number_of_Links' greater than 0 (or not equal to zero). I tried:

my $sth = $cat_db->select ( {'FatherID' => 0, Number_of_Links > 0, Cat_Include => 'Yes'},['Full_Name','Name'] );

but then I get the error:

Unable to compile: Bareword "Number_of_Links" not allowed while "strict subs" in use at...

Does anyone know how I can put in this extra condition for the Number_of_Links and make it work?

--FrankM
Subject Author Views Date
Thread Select greater than... FrankM 5022 May 27, 2004, 1:24 PM
Thread Re: [FrankM] Select greater than...
Andy 4976 May 28, 2004, 2:15 AM
Thread Re: [Andy] Select greater than...
FrankM 4929 May 28, 2004, 11:23 AM
Thread Re: [FrankM] Select greater than...
Andy 4948 May 29, 2004, 1:09 AM
Post Re: [Andy] Select greater than...
FrankM 4874 Jun 7, 2004, 1:34 PM