is normalizing the database an option? :) On Fri, Jun 20, 2008 at 11:52 AM, Richard White <[EMAIL PROTECTED]> wrote: > hi matt this is a good idea, shame about the leading and trailing commas > though this would prove to be a pain, until i can find another solution i > will do the loop and use the list find though thanks for your help > > > >>I had something like this once upon a time. I think I had to >>manipulate the data so that I had leading and trailing commas in the >>list in table. This was so I wouldn't get false matches, such as 6 >>being found in this list: 1,16,8. If you can do that, this might work. >> >><cfquery ...> >>select col1, col2 >>from mytable >>where 1=0 >><cfloop list="2,6" index="i"> >>OR col2 Like '%,#i#,%' >></cfloop> >></cfquery> >> >>If you can't make sure of the leading and trailing commas (which is >>somewhat an ugly solution), you will have to do some looping over >>queries. I'll defer to someone else for how this would work because >>the only thing I can think of is to get all records and then loop over >>those results and do a ListFind for each record. And for each record >>you'd have to loop over the list of criteria too. >> >> >> >>> > >
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307856 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4