if your form fields had names that correspond your db table columns names...
and were identifiable by some common prefix... like f_city, f_state,
f_zip ...
you could do something like:

WHERE 1=1
<cfloop list="#form.fieldnames#" index="fname">
<cfif listfirst(fname, "_") is 'f' AND len(trim(form['#fname#']))>AND
table.#fname# = <cfqueryparam cfsqltype="cf_sql_..."
value="form['#fname#']"></cfif>
</cfloop>

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/



LSD 4Me wrote:
> That looked like a simple solution for a mind who is looking for complex 
> synatx...:) One last question though, is there a way to include all form 
> items as opposed to stating each one individualy? I will eventually have 
> 10-15 criteria...Thanks! 
>   

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302955
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to