You don't need multiple queries. Just run one query with WHERE ID IN
(#form.id#) and do a <cfloop query = "myQuery">.

-----Original Message-----
From: Sorgatz, Rex [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, March 03, 2002 8:33 PM
To: CF-Talk
Subject: simple cfloop


Beginner CFer with an easy question. The situation: the user selects the
rows to query based upon ticking checkboxes. So, this is the first page:

<form action="tally.cfm" method="post">
<input type="checkbox" name="id" value="180">
<input type="checkbox" name="id" value="192">
<input type="checkbox" name="id" value="204">
<input type="checkbox" name="id" value="307">
<input type="submit" value="go">
</form> 

Using a list and a cfloop to return multiple columns in only the rows
the user selects, what would the tally.cfm page look like? I'm looking
at something like this, but I know it's wrong:

<cfloop index="ListIndex" list="#FORM.id#" delimiters=","> <cfquery
name="listsQuery" datasource="xxx"> SELECT this, that, theotherthing
FROM tblName WHERE ID = #id# </cfquery> 
<cfoutput
query="listsQuery">#this#<br>#that#<br>#theotherthing#<br><br></cfoutput
>
</cfloop>

Thanks for your help.


______________________________________________________________________
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to