If I understand this correctly, you'll be getting a value of 1,2 back in
FORM.floor. If that's the case, this should work:
<cfquery name="Getfloor" datasource="inventory">
SELECT * FROM inventory WHERE 0 = 0
<cfif IsDefined("FORM.floor") and form.floor NEQ "">
AND floor IN (#form.floor#)
</cfif>
</cfquery>
But that's only if the values of the checkboxes are numbers. If they're
strings, try this instead:
AND floor IN #ListQualify(FORM.floor, "'")#
Adrian
-----Original Message-----
From: Orlini, Robert [mailto:[EMAIL PROTECTED]
Sent: 17 January 2006 19:31
To: CF-Talk
Subject: Search two values in one field
How do I implement a search of two different values in one field?
I want to search for floors 3 and 4 in the field named "floor" and display a
report. Then html form uses checkboxes for each floor.
Here is my previous search statement with one floor per search; how can I
modify it? Thanks!
<cfquery name="Getfloor" datasource="inventory">
SELECT * FROM inventory where 0 = 0
<CFIF IsDefined("FORM.floor") and form.floor NEQ "">
And floor = '#trim(form.floor)#'
</CFIF>
</cfquery>
Robert Hww
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229797
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54