How many properties do you have in the database?


----- Original Message -----
From: Chris Giminez <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 29, 2000 3:31 PM
Subject: Re: looping through a mailing list


> I've changed part of the checking to the query, not cfif's, but I am still
getting the same wrong
> results. I could really use some help if someone can,  or at least a nudge
in the right direction.
>
> ***********<!--- Get the list of subscribers who wich to be notified. --->
> <CFQUERY NAME="notify_list" DATASOURCE="kane">
> SELECT      *
> FROM         notify
>
> Where
> 0=0
> AND
> #form.bed# >= des_bed
> AND
> #form.bath# >= des_bath
> AND
> #form.garage# >= des_garage
> AND
> #form.price# >= gt_price
> AND
> #form.price# <= lt_price
> AND
> #form.sq_ft# >= des_sq_ft
>
> ORDER BY  date_subscribed
> </CFQUERY>
>
> <!--- Loop through the subscribers --->
> <cfloop QUERY="notify_list">
>
> <!--- Check the desires of the subscriber against the actual values of the
property. --->
> <cfif
> notify_list.des_city CONTAINS form.city
> AND
> form.display eq 1
> AND
> form.status eq "for sale"
> >
> <!--- Send email if the cfif evaluates true <cfmail block will go here
when it's working right. --->
>
> Send email to <cfoutput query="notify_list">#notify_list.first_name#
> #notify_list.last_name#</cfoutput><br>
>
> <cfelse>
>
> <!--- Don't send email if cfif evaluates to false. cfelse is only here for
testing now. --->
>
>
> Don't send email <cfoutput query="notify_list">#notify_list.first_name#
> #notify_list.last_name#</cfoutput><br>
>
> </cfif>
>
> </cfloop>
> ***************
>
> Thanks!
>
> Chris Giminez
> Owner - Cyber Scriber Web Site Design
> 831-728-4469
> ICQ# 2628000
>
>
>
>
> > Yer wasting a lot of processing power in coldfusion unnecessarily.  You
> > should build a where clause that replicates the conditions you are
searchinf
> > for in your CFIF, that way you just loop over the result set and send
the
> > email to every single record.  SQL Will handle that much faster than
Cold
> > Fusion will.
> >
> > Jordon
> >
> >
>
>
> >
> > This is for a real estate web site where the realtor will add their own
> > property. When new property
> > is added, I want it to check a data table of subscribers who are
interested
> > in a property fitting
> > certain criteria, such as price, number of bedrooms, bathrooms, etc.
> >
> > I thought I had this figured out, but am not getting the desired
results.
> >
> > Here's my code:
> > ******************
> > <!--- Get the list of subscribers who wich to be notified. --->
> > <CFQUERY NAME="notify_list" DATASOURCE="kane">
> > SELECT      *
> > FROM         notify
> > ORDER BY  date_subscribed
> > </CFQUERY>
> >
> > <!--- Loop through the subscribers --->
> > <cfloop QUERY="notify_list">
> >
> > <!--- Check the desires of the subscriber against the actual values of
the
> > property. --->
> > <cfif
> > form.bed gte notify_list.des_bed
> > AND
> > form.bath gte notify_list.des_bed
> > AND
> > form.garage gte notify_list.des_garage
> > AND
> > form.price gte notify_list.gt_price
> > AND
> > form.price lte notify_list.lt_price
> > AND
> > form.sq_ft gte notify_list.des_sq_ft
> > AND
> > notify_list.des_city CONTAINS form.city
> > AND
> > form.display eq 1
> > AND
> > form.status eq "for sale"
> > >
> > <!--- Send email if the cfif evaluates true <cfmail block will go here
when
> > it's working right. --->
> > Send email to <cfoutput query="notify_list">#notify_list.first_name#
> > #notify_list.last_name#</cfoutput><br>
> > <cfelse>
> >
> > <!--- Don't send email if cfif evaluates to false. cfelse is only here
for
> > testing now. --->
> >
> >
> > Don't send email <cfoutput query="notify_list">#notify_list.first_name#
> > #notify_list.last_name#</cfoutput><br>
> >
> > </cfif>
> >
> > </cfloop>
> > **********************
> >
> > I currently have just 3 subscrbers in the notify table for testing and
the
> > above code gives me this
> > result.
> >
> > *****************
> > Send email to joe testerTest PersonChris Giminez
> > Don't send email joe testerTest PersonChris Giminez
> > Don't send email joe testerTest PersonChris Giminez
> > *****************
> > It's somehow evaluating to true and false for each person.
> >
> > I know I'm close to getting this. If someone could enlighten me I would
be
> > most grateful.
> >
> > Thanks!
> >
> > Chris Giminez
> > Owner - Cyber Scriber Web Site Design
> > 831-728-4469
> > ICQ# 2628000
> >
> >
> >
> >
> >
>
> --------------------------------------------------------------------------
--
> > --
> > 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