Hi,l
So literally just grab the number of links in a given sub-category?
There are a couple of ways of doing this...
1) Add the new global: get_subcat_count
return $DB->table('CatLinks')->count( { CategoryID => $_[0] } ) || 0;
}
...call with:
<%get_subcat_count(1234)%> (1234 = the category ID you wanna get)
2) Use the existing field in the Category table:
get_subcat_count
return $DB->table('Category')->select( ['Direct_Links'], { ID => $_[0] } )->fetchrow;
}
Untested, but both of those should do the trick (the 2nd one is probably the better option, seeing as GLinks has already been so nice to give you that value <G>)
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!
So literally just grab the number of links in a given sub-category?
There are a couple of ways of doing this...
1) Add the new global: get_subcat_count
Code:
sub { return $DB->table('CatLinks')->count( { CategoryID => $_[0] } ) || 0;
}
...call with:
<%get_subcat_count(1234)%> (1234 = the category ID you wanna get)
2) Use the existing field in the Category table:
get_subcat_count
Code:
sub { return $DB->table('Category')->select( ['Direct_Links'], { ID => $_[0] } )->fetchrow;
}
Untested, but both of those should do the trick (the 2nd one is probably the better option, seeing as GLinks has already been so nice to give you that value <G>)
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!