Blog
Developers
Careers
Support
Contact
Gossamer Threads
Solutions
Results
About
Mailing Lists
Resource Centre
Forum
Tools
Home
Who's Online
Tags
Favourites
Login
Register
Forum Search
(
Advanced Search
)
This forum
This category
All forums
for
Home
:
Products
:
Gossamer Links
:
Development, Plugins and Globals
:
Count Votes < 10
Previous Thread
Next Thread
Print Thread
View Threaded
Oct 10, 2003, 1:59 AM
mkoenig
Novice
(47 posts)
Oct 10, 2003, 1:59 AM
Post #1 of 5
Views: 471
Shortcut
Count Votes < 10
Hi boys
i am looking for a Global to count the links where Votes > 10 in every
category.
Marina
Oct 10, 2003, 2:14 AM
Andy
Veteran
/ Moderator
(17366 posts)
Oct 10, 2003, 2:14 AM
Post #2 of 5
Views: 458
Shortcut
Re: [mkoenig] Count Votes < 10
In reply to
Something like this maybe?
Code:
sub {
my $ID = $_[0];
my $sth = $DB->table('Links')->select( GT::SQL::Condition->new('Votes','>=','10') );
my $back;
while (my $hit = $sth->fetchrow_hashref) {
$back .= Links::SiteHTML->display('links',$hit);
}
return $back;
}
Call it with;
<%global_Name($ID)%>
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
Oct 10, 2003, 3:13 AM
mkoenig
Novice
(47 posts)
Oct 10, 2003, 3:13 AM
Post #3 of 5
Views: 456
Shortcut
Re: [Andy] Count Votes < 10
In reply to
Hi Andy
i get an error in sitehtml
i want only the count of the votes > 10
marina
Oct 10, 2003, 3:16 AM
Andy
Veteran
/ Moderator
(17366 posts)
Oct 10, 2003, 3:16 AM
Post #4 of 5
Views: 455
Shortcut
Re: [mkoenig] Count Votes < 10
In reply to
Oh, in that case, try something like;
Code:
sub {
my $ID = $_[0];
my $count = $DB->table('Links')->count( GT::SQL::Condition->new('Votes','>=','10') );
return $count;
}
Call with <%global_name($ID)%>
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
Oct 10, 2003, 3:34 AM
mkoenig
Novice
(47 posts)
Oct 10, 2003, 3:34 AM
Post #5 of 5
Views: 454
Shortcut
Re: [Andy] Count Votes < 10
In reply to
Hi Andy
This global works fine
but i want to display the count of links in the category in the category page
ex.
cat 1 -->10
cat2 -->2
cat3 -->20
Marina
Previous Thread
Next Thread
Print Thread
View Threaded