For each dropdown box or checkbox, have 3 choices:
Y = Yes - I need this
N = No - I do not want this
D = Doesn't matter
When you go to set up the sql statment, do something like:
Select col1,col2,col3,etc from amenities
Where (1=1)
<cfif hottubs is not 'D'>
And ( hottubs = #hottubs# )
</cfif>
<cfif minibar is not 'D'>
And ( minibar = #minibar# )
</cfif>
the 1=1 is there in case they pick doesn't matter for all of the choices -
so you don't trigger an error.
Just do this for each field.
Al
a1webs.com
>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!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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