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
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