Use cfqueryparam

<CFQUERY name="upd_vote_yes" datasource="#datasource#">
update dbo.tbl_contest_2007
SET cb_vote1 = 1
WHERE cbcont_id IN <cfqueryparam cfsqltype="cf_sql_int" list="yes"
value="#FORM.vote#">
</CFQUERY>

Marius Milosav 
ScorpioSoft Corp.
www.scorpiosoft.com
It's not about technology, it's about people

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: July 6, 2007 11:09 AM
To: CF-Talk
Subject: CFQUERY where id = #valuelist(values from form scope)#

All,  Within a CFQUERY Valuelist works well when working with the query
scope, but 
when I try and pass it  the form scope (FORM.variablename) tries to read it
as a query.

What can I use besides valuelist to parse this list?

FORM.vote contains ids... 8,9,12,13,14 

<CFQUERY name="upd_vote_yes" datasource="#datasource#">
update dbo.tbl_contest_2007
SET cb_vote1 = 1
WHERE cbcont_id IN '#FORM.vote#'>
</CFQUERY>

Thanks
D



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create Web Applications With ColdFusion MX7 & Flex 2. 
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS 

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

Reply via email to