Look at comments inline... you forgot to var the variable (to make it local
scope to the function, otherwise it's global to the whole cfc), and this
could cause issues when the cfc is cached in memory (instead of invoked
everytime). 

Russ

-----Original Message-----
From: Bryan Stevenson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 21, 2005 12:19 PM
To: CF-Talk
Subject: Re: Looping over query assistance

Just return the whole query and skip all the other stuff...like so:

<cffunction name="getCourseData" access="remote">

<cfargument name="R_userName" type="string" required="yes">

<!--- you forgot this --->
<cfset var getCourses="">

<cfquery name="getCourses" datasource="learnline">
SELECT title FROM courses
WHERE userid = <cfqueryparam cfsqltype="CF_SQL_STRING"
value="#Arguments.R_userName#">
</cfquery>

<cfreturn getCourses>

</cffunction>

I just don't see the point of stuffing the only column returned (title) into

an array.....just use the query ;-)

HTH

Cheers

Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com 




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212426
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to