<!-- BEGIN TOPLIST 7 --> <CONFIG>links,rand(),,ascending,fieldname = 'bannerattach',,,0,0,0,0,0,0,,0</CONFIG> <IF {LINKTYPE} is featured> <div class="bannerad"> <img src="thumbnail.php?id={LINKID}&field=bannerattach&thumbwidth=468&thumbheight=60"> </div> </IF> <!-- END TOPLIST 7 -->
But I am clearly well off the mark with this.
Here's what I am trying to do...
I am allowing members who purchase a featured link the chance to upload a banner (Via a custom attachment field) which will be dispolayed at random along with other members banners. I thought a toplist would be the way to do this. Not every member who purchases a featured link will upload a banner so the top list needs to filter out those that dont.
<CONFIG>links,rand(),1,ascending,type='featured' AND fieldname='bannerattach',,,0,0,0,0,0,0,,0</CONFIG
But I get...
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/sites/click4localbusiness.co.uk/public_html/databases/mysql.php on line 26
<CONFIG>links,rand(),1,ascending,type='featured' AND fieldname='bannerattach',,,0,0,0,0,0,0,,0</CONFIG
But I get...
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/sites/click4localbusiness.co.uk/public_html/databases/mysql.php on line 26
when I try to load any page
hmm, looking at it again - is the field's name really fieldname?
Comments on Toplist question
Forum Regular
Usergroup: Customer
Joined: Nov 27, 2006
Total Topics: 187
Total Comments: 465
Hello
How do I create a toplist that only shows links that are of a particular link type, and only links that have a particular field filled in?
Forum Regular
Usergroup: Customer
Joined: Nov 27, 2006
Total Topics: 187
Total Comments: 465
Her's what I tried...
<!-- BEGIN TOPLIST 7 -->
<CONFIG>links,rand(),,ascending,fieldname = 'bannerattach',,,0,0,0,0,0,0,,0</CONFIG>
<IF {LINKTYPE} is featured>
<div class="bannerad">
<img src="thumbnail.php?id={LINKID}&field=bannerattach&thumbwidth=468&thumbheight=60">
</div>
</IF>
<!-- END TOPLIST 7 -->
But I am clearly well off the mark with this.
Here's what I am trying to do...
I am allowing members who purchase a featured link the chance to upload a banner (Via a custom attachment field) which will be dispolayed at random along with other members banners. I thought a toplist would be the way to do this. Not every member who purchases a featured link will upload a banner so the top list needs to filter out those that dont.
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
when generating a toplist have the filter: type='featured' AND fieldname='bannerattach'
Forum Regular
Usergroup: Customer
Joined: Nov 27, 2006
Total Topics: 187
Total Comments: 465
Hi babrees
I just tried that...
<CONFIG>links,rand(),1,ascending,type='featured' AND fieldname='bannerattach',,,0,0,0,0,0,0,,0</CONFIG
But I get...
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/sites/click4localbusiness.co.uk/public_html/databases/mysql.php on line 26
when I try to load any page
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
I just tried that...
<CONFIG>links,rand(),1,ascending,type='featured' AND fieldname='bannerattach',,,0,0,0,0,0,0,,0</CONFIG
But I get...
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/sites/click4localbusiness.co.uk/public_html/databases/mysql.php on line 26
when I try to load any page
hmm, looking at it again - is the field's name really fieldname?
----
Jill
PS Are you up late or an early riser too? <G>
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
I'm guessing the field is actually named bannerattach, so he wants
type='featured' AND bannerattach != ''
Forum Regular
Usergroup: Customer
Joined: Nov 27, 2006
Total Topics: 187
Total Comments: 465
Paul, you are a diamond.
Support here is brilliant, thanks.