Jason,

I replied to this yesterday.  Here it is again:

Do you mean this:
<CFSET FieldList = "field1,field2,field3,field4">  <!--- you could get this 
dynamically if you want --->
<CFSET ValueToSearch = "hello" >
<cfquery name="Lookup" datsource="yourdatasource">
        SELECT #fieldlist#
        FROM yourtable
        WHERE
                <CFLOOP LIST="#fieldlist#" INDEX="field">
                        #field# = <cfqueryparam cfsqltype="SQL_VARCHAR" 
value="#ValueToSearc#"> OR
                </CFLOOP>
                1 = 0
</cfquery>
        
I'm sure there are more than one way to do it, but that's how I'd do it.  The 1 
= 0 is needed because you have to have another comparison after the last OR in 
the list.  If you are checking against other values as well, then you could 
just use those instead.  Basically, in this example, it's just 'filler'.

Dave

******************************************************************************************
The information contained in this message, including attachments, may contain 
privileged or confidential information that is intended to be delivered only to 
the 
person identified above. If you are not the intended recipient, or the person 
responsible for delivering this message to the intended recipient, ALLTEL 
requests 
that you immediately notify the sender and asks that you do not read the 
message or its 
attachments, and that you delete them without copying or sending them to anyone 
else. 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212959
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to