Since the data is not coming from direct user input, I say that you could
probably skip the cfqueryparam. But if you did decide to use it, my guess is
that you'd use the varchar type (it's just a string after all).

<!----------------//------
andy matthews
web developer
certified advanced coldfusion programmer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--------------//--------->

-----Original Message-----
From: Richard Dillman [mailto:[EMAIL PROTECTED]
Sent: Friday, December 01, 2006 1:34 PM
To: CF-Talk
Subject: Cfqueryparam and a list


I have a URL value passing to a Cfquery

<cfquery name="CheckFam" datasource="#DSN#" username="#dbusername#"
password="#dbpassword#">
 SELECT     ID, Child, Family
 FROM       CFX_Family_Members
 WHERE     (Family = <cfqueryparam value="#URL.ID#"
cfsqltype="CF_SQL_INTEGER">)
</cfquery>

then dump the ID's to a Valuelist to be used in the next query

<cfset kidlist = ValueList(CheckFam.Child) />

<cfquery name="names" datasource="#DSN#" username="#dbusername#"
password="#dbpassword#">
 SELECT REC_ID,CHILD_ID,FIRSTNAME
 FROM  Children
 where REC_ID IN(#kidlist#)
</cfquery>

The *BIG* Question is do I need to use a cfqueryparam in the second query,
and IF I do, how would I put the info into it IE what  cfsqltype?


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:262501
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to