Try this:
<cfset ads = evaluate("#application.dbpre#Advertizements") />
<CFIF IsDefined("form.zip")
and form.zip IS NOT ""
and IsDefined("form.radius")
and form.radius neq 0
and len(form.zip) eq 5
and ( listfind(valuelist(results.zip),ads.zipcode)
or (listfindnocase(valuelist(results.city),ads.city)
and listfindnocase(valuelist(results.state),ads.state)
)>
</CFIF>
If your results query only contains one row (or is only supposed to
contain one row), then it's even simpler because you can drop the
listfindnocase(valuelist()) from the code alltogether
(results.zip is ads.zipcode
or results.city is ads.city and results.state is ads.state)
Actually if the query is more than one record, then you might get
mismatches anyway, because you might wind up with an add for Trenton
New Jersey and another add for Trenton Ohio and end up with matches
for both whenever you're looking for one or the other.
hth
--
s. isaac dealey :: AutLabs
Creating meaningful employment for people with Autism
http://www.autlabs.com
ph: 817.385.0301
http://onTap.riaforge.org/blog
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327478
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4