If you have a checkbox for the 'Don't Matter' or dont include, then
assign it a value then in the WHERE clause of the SQL test the value
and if it is one of those cases, do not include it in the SQL

Something along the lines of: 

Select *
>From MyTable
<cfif NOT isdefined(checkboxdontmatter)>
Where checkboxresults = 1 
</cfif>

-----Original Message-----
From: P@tty Ayers [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 04, 2001 1:31 PM
To: CF-Talk
Subject: How to Allow a "Doesn't Matter" Variable in a Search?


Friends:  Can anyone help with this problem I'm stuck on? Not sure if this
is a simple one or not, but in any case I'll sure be delighted to get it
working.

This set of pages allows the user to search a set of records using 9 search
objects. Four of those are for searching yes/no (1/0) fields in the
Access2000 database.

For the four search fields which search yes/no columns, I  want them to
choose either "This doesn't matter - don't include this in the search" OR
"Include only records with "yes" (1) in this column. They need to be able to
specify that they want to see only rental properties that have a hot tub, or
else that this doesn't matter to them.

Obviously this differs from offering the choice between "Include only
records with 'yes' in this column" and "Include only records with 'no' in
this column", which is *not* what I need to do here.

This could be done with checkboxes or a menu - but I can't figure out how to
allow that "This doesn't matter" search parameter.

Thanks very much in advance for your help!


P@tty Ayers
Macromedia Evangelist

Dreamweaver Resources, FAQs, and Tutorials:
http://www.thepattysite.com/dreamweaver/

P@tty's ColdFusion Site
http://carolina.cf-developer.net

Carolina Web Solutions
http://www.carolinawebsolutions.com

"Design in art, is a recognition of the relation between various things,
various elements in the creative flux. You can't invent a design. You
recognise it, in the fourth dimension. That is, with your blood and your
bones, as well as with your eyes."  - D. H. Lawrence

"Well-behaved women seldom make history."  - Anonymous
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to