Howdy!
I am working on a script (action form). Five variables are passed ... I want to check on variables (fields) and build a string to be used within my query command.
Here is the few lines of code where I am stuck
I am hoping to build variable SearchString to use it within the WHERE clause of the cfquery.
How can I do this?
Thank you all in advance.
Jose Lerebours
KNOWLEDGE: Something you can give away endlessly and gain more of it in the process! - Jose Lerebours
I am working on a script (action form). Five variables are passed ... I want to check on variables (fields) and build a string to be used within my query command.
Here is the few lines of code where I am stuck
Code:
<cfparam name="SearchString" type="string" default="">
<cfif isdefined("form.homephonenumber") AND #form.homephonenumber# IS NOT "">
<cfset SearchString="">
<cfif isdefined("form.workphonenumber") AND #form.workphonenumber# IS NOT "">
<cfset SearchString="">
<cfelseif isdefined("form.lastname") AND #form.lastname# IS NOT "">
<cfset SearchString="">
<cfelseif isdefined("form.companyname") AND #form.companyname# IS NOT "">
<cfset SearchString="">
<cfelseif isdefined("form.city") AND #form.city# IS NOT "">
<cfset SearchString="">
</cfif>
I am hoping to build variable SearchString to use it within the WHERE clause of the cfquery.
How can I do this?
Thank you all in advance.
Jose Lerebours
KNOWLEDGE: Something you can give away endlessly and gain more of it in the process! - Jose Lerebours