Wrong forum (I've moved it for you)
A quick answer, would be something like this;
my $sth = $db->select( ['ID','Full_Name','Number_of_Links'], $cond )
|| return $GT::SQL::error;
...which should then grab the category in question, and its sub-categories.
You would also modify it a little bit more... by adding;
... right below;
Then, you will need to use;
my $sth = $db->select( ['ID','Full_Name','Number_of_Links'], $cond )
|| return $GT::SQL::error;
.. and then call with;
Not tested.. but should work / get you on the right tracks :)
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!
A quick answer, would be something like this;
Code:
my $cond = GT::SQL::Condition->new('Full_Name','LIKE','CategoryName%'); my $sth = $db->select( ['ID','Full_Name','Number_of_Links'], $cond )
|| return $GT::SQL::error;
...which should then grab the category in question, and its sub-categories.
You would also modify it a little bit more... by adding;
Code:
my $category_name = $_[1];... right below;
Code:
my $show_count = $_[0];Then, you will need to use;
Code:
my $cond = GT::SQL::Condition->new('Full_Name','LIKE',"$category_name%"); my $sth = $db->select( ['ID','Full_Name','Number_of_Links'], $cond )
|| return $GT::SQL::error;
.. and then call with;
Code:
<%global('1','Category Name')%>Not tested.. but should work / get you on the right tracks :)
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!