Is there a reason why you are doing this in two queries instead of one query with a join?
On 8/7/07, Marc Quattrini <[EMAIL PROTECTED]> wrote: > > Hi Charlie, > > The problem seems to be with the "OR 1=1" statement. It should read "AND > 1=1". It accept always True otherwise and all records have this. > > Thanks. > > Marc > > -----Original Message----- > From: Charlie Griefer [mailto:[EMAIL PROTECTED] > Sent: Wednesday, 8 August 2007 11:31 > To: CF-Talk > Subject: Re: Query with dynamic criterias? > > Cust IN (#listQualify(valueList(custCompanies.Supplier), "'")# > > (the last param of the listQualify there is a single quote between two > double quotes) > > doing this however, you lose the wildcard in the supplier... > > if you really need that, you'll have to loop: > > WHERE > <cfloop query="custCompanies"> > CUST like '#supplier#%' OR > </cfloop> > 1 = 1 > > > -- > Charlie Griefer > > ================================================ > "...All the world shall be your enemy, Prince with a Thousand Enemies, > and whenever they catch you, they will kill you. But first they must catch > you, digger, listener, runner, prince with a swift warning. > Be cunning and full of tricks and your people shall never be destroyed." > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Download the latest ColdFusion 8 utilities including Report Builder, plug-ins for Eclipse and Dreamweaver updates. http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285654 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

