Keep asking, and we'll keep answering!
Cheers,

Rob

On Thu, Aug 20, 2009 at 10:03 PM, John Barrett <[email protected]> wrote:

>
> Hi Rob,
> Thanks this works,and I am understanding too. Thanks so much this was
> really throwing me to what I was doing wrong.
> John
> On Aug 20, 2009, at 3:54 PM, Rob Parkhill wrote:
>
> >
> > John,
> > You have to call the method.  You are not.  So the method as defined
> > in the
> > component is getLinks1 and getLinks2, and you are calling the methods,
> > CFLinks and FlashLinks
> > so you need to change those.
> >
> > this should help:
> >
> >
> >>
> >> <cfcomponent>
> >>
> >>   <cffunction name="getLinks1" access="public" returntype="query">
> >>       <!--- cfquery for CF--->
> >>       <cfquery name="CFLinks" datasource="#REQUEST.dataSource#">
> >>           SELECT *
> >>           FROM Links
> >>           WHERE category = "CF"
> >>           ORDER BY title ASC
> >>       </cfquery>
> >>
> >>       <cfreturn CFLinks>
> >>   </cffunction>
> >>
> >>   <cffunction name="getLinks2" access="public" returntype="query">
> >>       <!--- cfquery for CF--->
> >>       <cfquery name="FLashLinks" datasource="#REQUEST.dataSource#">
> >>           SELECT *
> >>           FROM Links
> >>           WHERE category = "flash"
> >>           ORDER BY title ASC
> >>       </cfquery>
> >>
> >>       <cfreturn FLashLinks>
> >>   </cffunction>
> >>
> >> </cfcomponent>
> >>
> >>
> >> <!--- myTestPage.cfm--->
> >> <cfinvoke component="Testing"
> >> method="getLinks1"
> >> returnvariable="CFLinks"/>
> >>
> >> <cfoutput query="CFlinks"> <a href="#link#">#title#</a> <br />
> >> #description#<p></cfoutput>
> >> <p>
> >>
> >> <cfinvoke component="Testing"
> >> method="getLinks2"
> >> returnvariable="FlashLinks"/>
> >>
> >> <cfoutput query="Flashlinks"> <a href="#link#">#title#</a> <br />
> >> #description#<p></cfoutput>
> >>
> >
> >
> > Rob
> >
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:4732
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to