Hi John,
Try this:
<cfquery name="getLinks" datasource="#REQUEST.dataSource#">
SELECT *
FROM Links
WHERE Category = "CF"
</cfquery>
<cfoutput query="getLinks" >
<a href="#getLinks.link#">#getLinks.title#</a> <br />
#description#
</cfoutput>
Paul
-----Original Message-----
From: John Barrett [mailto:[email protected]]
Sent: Thursday, August 20, 2009 8:39 PM
To: cf-newbie
Subject: cfquery output+WHERE
Can I do something like this? I get an error saying WHERE is not allowed?
Now I know it is allowed in the cfquery, but if I want to use the WHERE
clause in the cfquery output are there any options?
Thanks,
John
<cfquery name="getLinks" datasource="#REQUEST.dataSource#">
SELECT *
FROM Links
</cfquery>
<cfoutput query="getLinks" WHERE Category = "CF">
<a href="#getLinks.link#">#getLinks.title#</a> <br />
#description#
</cfoutput>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4727
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15