I ran out of RedBull so I am slow this morning. 

I have a series on checkboxes in a form. I would like the user to pick the 
checkboxes they want then hit a button to show those respective items as labels 
on a display page. I am having trouble trying to get the ids of these items to 
populate the table row by row. I need to be able to loop an array or query on 
the display page.

Is it bad practice to run a query on each one of those items in the list using 
a loop like so:

<cfloop index="i" list="form.checkboxfield">
<cfquery>
Select field1, field2, field3 from table where field1 = i
</cfquery>
</cfloop>

Won't that create a database connection for each item in the list? Is there an 
alternative to use that is more efficient?

Thanks.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade & see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276204
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