RE: How to Allow a Doesn't Matter Variable in a Search?

2001-04-04 Thread Kelly Matthews

Well if it doesn't matter just don't pass the parameter have it set with a
value of "" and
then when you run the query CFIF parameter IS "YES"where hottub =
Yes/CFIFetc
that way if they pass the parameter blank it won't include it in the search,
hence pulling
up records that do and/or don't include hottubs. Is that what you mean? If
not let me know.
Kelly

 -Original Message-
 From: P@tty Ayers [SMTP:[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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: How to Allow a Doesn't Matter Variable in a Search?

2001-04-04 Thread Adkins, Randy

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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: How to Allow a Doesn't Matter Variable in a Search?

2001-04-04 Thread Garza, Jeff

Why not use radio inputs?  This way you can have something like this...

Search for properties with...

HotTub?
input type="radio" name="hottub" vaule="" Not Important.
input type="radio" name="hottub" vaule="1" I Need a Hottub!
Pool?
input type="radio" name="pool" vaule="" Not Important.
input type="radio" name="pool" vaule="1" I Need a Pool!

Validate on the second page...

CFQUERY datasource="blah"
SELECT * FROM Listings
WHERE 1 = 1  // get's around having a default WHERE Clause to start with.
CFIF form.hottub NEQ ""
AND hottub = 1
/CFIF
CFIF form.pool NEQ ""
AND pool = 1
/CFIF
ORDER BY ListingID
/CFQUERY

Or whatever

Jeff Garza
Web Developer/Webmaster
Spectrum Astro, Inc.
480.892.8200

[EMAIL PROTECTED]
http://www.spectrumastro.com



-Original Message-
From: P@tty Ayers [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, April 04, 2001 10:31 AM
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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: How to Allow a Doesn't Matter Variable in a Search?

2001-04-04 Thread Phoeun Pha

just set a condition to not do a WHERE statement in your SQL if they choose
"it don't matter"
- Original Message -
From: P@tty Ayers [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Wednesday, April 04, 2001 11:30 AM
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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: How to Allow a Doesn't Matter Variable in a Search?

2001-04-04 Thread Christopher Olive, CIO

if you use checkboxes for the selections, use isDefined() on your action
page.  if the checkbox for that selection is defined, include it in your
where clause

ex:

SELECT


WHERE

CFIF isDefined("FORM.hottub")
AND hottub field is yes
/CFIF

chris olive, cio
cresco technologies
[EMAIL PROTECTED]
http://www.crescotech.com



-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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: How to Allow a Doesn't Matter Variable in a Search?

2001-04-04 Thread Lamon, Alec

Patty -- Checkboxes might solve your problem 'cuz they only get passed as form values 
if they're *checked.*  Therefore, your query could simply string together only the 
passed checkboxes for the Boolean case you describe below.  The user says 'This 
doesn't matter' by simply not checking a particular box.

Hope this helps,

Alec

 -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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: How to Allow a Doesn't Matter Variable in a Search?

2001-04-04 Thread Al Musella, DPM


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,etcfrom 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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: How to Allow a Doesn't Matter Variable in a Search?

2001-04-04 Thread sbernard

The easiest way would be to simply _not_ include that field in the 
WHERE clause of your query. The default characteristic of HTML 
checkboxes helps because, if no elements for the checkbox group 
are 'checked' or given default values then the variable is not passed 
to the ACTION target.

SELECT *
FROM Properties
WHERE ... CFIF isDefined("FORM.Hottub")AND HOTTUB = FORM.Hottub/CFIF

Steve


- Original Message -
From: "P@tty Ayers" [EMAIL PROTECTED]
Date: Wednesday, April 4, 2001 1:30 pm
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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists