Not a problem....  Instead of

<CFIF Acres IS NOT "">
 AND Acres LIKE '#Acres#%'
</CFIF>

change it to

<cfif acres is 1> and (acres >= 1 and acres <= 5)
<cfelseif acres is 2> and (acres >= 6 and acres <= 10)
<cfelseif acres is 3> and acres >= 11</cfif>

like below:

<CFQUERY DATASOURCE="A2Z" NAME="Property">
SELECT ParcelID, APN, County, Acres, ID
FROM Property
WHERE 0 = 0

<CFIF ParcelID IS NOT "">
 AND ParcelID LIKE '#ParcelID#%'
</CFIF>

<CFIF APN IS NOT "">
 AND APN LIKE '#APN#%'
</CFIF>

<CFIF County IS NOT "">
 AND County LIKE '#County#%'
</CFIF>

<cfif form.acres is 1> and (acres >= 1 and acres <= 5)
<cfelseif form.acres is 2> and (acres >= 6 and acres <= 10)
<cfelseif form.acres is 3> and acres >= 11</cfif>

ORDER BY ParcelID

</CFQUERY>

Does that make more sense?  HTH

Josh


----- Original Message -----
From: "LH Rothman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 01, 2000 3:04 PM
Subject: Re: Checkbox Search Within Range Again


> Thanks for the suggestion but I'm a newbie and can't figure out how/where
to insert that code.  Here is PROPSRCH1.CFM.  Any help would be appreciated.
> -Laura
>
> <CFQUERY DATASOURCE="A2Z" NAME="Property">
> SELECT ParcelID, APN, County, Acres, ID
> FROM Property
> WHERE 0 = 0
>
> <CFIF ParcelID IS NOT "">
>  AND ParcelID LIKE '#ParcelID#%'
> </CFIF>
>
> <CFIF APN IS NOT "">
>  AND APN LIKE '#APN#%'
> </CFIF>
>
> <CFIF County IS NOT "">
>  AND County LIKE '#County#%'
> </CFIF>
>
> <CFIF Acres IS NOT "">
>  AND Acres LIKE '#Acres#%'
> </CFIF>
>
> ORDER BY ParcelID
>
> </CFQUERY>
>
> <HTML>
>
> <HEAD>
> <TITLE>Property List</TITLE>
> </HEAD>
>
> <BODY VLINK=Black>
>
> <P><CENTER><FONT FACE=ARIAL SIZE=4><B>
> <CFOUTPUT>Found #Property.RecordCount# matches</CFOUTPUT>
> </b></font></CENTER>
>
> <P><CENTER>
> <TABLE BORDER=2 CELLPADDING=5>
> <CFOUTPUT QUERY="Property">
> <TR>
> <TD BGCOLOR=FAFAD2><FONT FACE=Arial SIZE=2>Parcel ID: <CFIF
Len(Trim(ParcelID)) IS 0>
> N/A</CFIF> <A HREF="propdt.cfm?ID=#ID#">#ParcelID#</A>,
> APN: <CFIF Len(Trim(APN)) IS 0>
> N/A</CFIF>#APN#, #County# County, #Acres#</FONT>
> </TD>
> </TR>
> </CFOUTPUT>
> </TABLE>
> </CENTER>
> </P>
>
> </BODY>
> </HTML>
>
>
> Josh Black wrote:
>
> > On your propsrch1.cfm page, when you're selecting the records to
display,
> > you could include something like this in your query
> >
> > <cfquery datasource="A2Z" name="selectRecordsToDisplay">
> >   select * from property where 0=0
> > <cfif form.acres is 1> and (acres >= 1 and acres <= 5)
> > <cfelseif form.acres is 2> and (acres >= 6 and acres <= 10)
> > <cfelseif form.acres is 3> and acres >= 11</cfif>
> > </cfquery>
> >
> > It's a bit of a hack, but it'll work.
> >
> > Josh
> >
> > ----- Original Message -----
> > From: "LH Rothman" <[EMAIL PROTECTED]>
> > To: "CF Talk" <[EMAIL PROTECTED]>
> > Sent: Monday, May 01, 2000 12:01 PM
> > Subject: Checkbox Search Within Range
> >
> > > Hi!
> > >
> > > How do I search within a numeric range?  For example, I want to be
able
> > > to use checkboxes to search by 1-5 or 6-10 acres.  My database
contains
> > > both whole and fractional amounts.
> > >
> > > Thanks for any help!
> > > -Laura
> > >
> > >
> > > <CFQUERY DATASOURCE="A2Z" NAME="GetCounty">
> > > SELECT DISTINCT County
> > > FROM Property
> > > </CFQUERY>
> > >
> > > <HTML>
> > > <HEAD>
> > > <TITLE>Property Search</TITLE>
> > > </HEAD>
> > > <BODY>
> > >
> > > <P><FONT FACE=ARIAL SIZE=4>Property Search</FONT></P>
> > >
> > > <FORM ACTION="propsrch1.cfm" METHOD="POST">
> > >
> > > <FONT FACE=ARIAL SIZE=2>
> > > APN: <INPUT TYPE="text" NAME="APN"><BR>
> > > Parcel ID: <INPUT TYPE="text" NAME="ParcelID"><BR>
> > > County:
> > > <SELECT NAME="County">
> > > <OPTION>
> > > <CFOUTPUT QUERY="GetCounty">
> > > <OPTION VALUE="#County#">#County#
> > > </CFOUTPUT>
> > > </SELECT>
> > > <BR>
> > > Acres:<BR>
> > > <INPUT TYPE="radio" NAME="Acres" VALUE="1">1-5<BR>
> > > <INPUT TYPE="radio" NAME="Acres" VALUE="2">6-10<BR>
> > > <INPUT TYPE="radio" NAME="Acres" VALUE="3">11+<BR>
> > > </FONT>
> > >
> > > <P>
> > > <INPUT TYPE="submit" VALUE="Search">
> > > <INPUT TYPE="reset" VALUE="Clear">
> > >
> > > </FORM>
> > >
> > > </BODY>
> > >
> > > </HTML>
> > >
> > >
> > >
> > >
> > >
> >
> --------------------------------------------------------------------------
> > ----
> > > Archives: http://www.eGroups.com/list/cf-talk
> > > To Unsubscribe visit
> > http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
or
> > send a message to [EMAIL PROTECTED] with 'unsubscribe'
in
> > the body.
> > >
> >
>
> --------------------------------------------------------------------------
----
> > Archives: http://www.eGroups.com/list/cf-talk
> > To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
>
> --------------------------------------------------------------------------
----
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
>

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to