macromedia.coldfusion.cfml_general_discussion
[Top] [All Lists]

Search from List contents...

Subject: Search from List contents...
From: "C-Rock"
Date: Wed, 7 Nov 2007 23:04:22 +0000 UTC
Newsgroups: macromedia.coldfusion.cfml_general_discussion

I wish to have a list of product ids that I can select the desired info from 
the database on each and it all be part of the same query. How do I do this for 
a list of ids?

 normally it's what I have below, so how can I amend this to take a numeric 
list of products and select all for each id in the list?

 Thanks!


 <cffunction name="test" access="remote" returnType="query">
   <cfargument name="thisId" type="numeric" required="yes">
   <cfquery name="testQuery" datasource="ourProducts" >
        SELECT *
        FROM products
        WHERE id = '#thisId#'
 </cfquery>
   <cfreturn testQuery>
 </cffunction>


<Prev in Thread] Current Thread [Next in Thread>