I have 3 options in my search criteria ,they are Name,CompanyName and Phone number.
The user can select any one of these .
"Name" and "CompanyName" are working perfectly but there is some problem with the
"Phone number"
Please help
>>>>>>The following code is for the used for searching>>>>>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<CFIF Form.Name is not "">
<!--- If Name is given ignore other inputs --->
<CFSET TheCriteria="#Form.Name#">
<CFELSE>
<!--- Only Company Name is specified --->
<CFIF (ParameterExists(Form.CompanyName)) and (Form.Ph1 is "")>
<CFSET TheCriteria="CF_Custom1 <matches> #Form.CompanyName#">
<cfelse>
<!--- Only Phone number is specified --->
<cfif (NOT ParameterExists(Form.CompanyName)) and (Form.Ph1 is not "")>
<CFSET TheCriteria="CF_Custom2 <matches> #Form.Ph1#">
</cfif>
</cfif>
</cfif>
<!--- <cfelseif (NOT ParameterExists(Form.Ph1)) and (Form.Name is not "")>
<CFSET TheCriteria="CF_Custom2 <matches> #Form.Ph1#">
</cfif>
</cfif> --->
<cfsearch collection="ClientSearch"
name="GetResults"
criteria="#TheCriteria#">
<html>
<head>
<title>Untitled</title>
</head>
<body>
<cfoutput>#GetResults.Recordcount# Client found for "#Form.Name#"</cfoutput>
<cfoutput query="GetResults">
<cftable query="GetResults" colheaders="yes" htmltable border>
<cfcol header="Name" Text="#Key#">
<cfcol header="CompanyName" Text="#Custom1#">
<cfcol header="PhoneNo" Text="#Custom2#">
<cfcol header="Email" Text="#Title#">
</cftable>
</cfoutput>
</body>
</html>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>>>>.The following code is for search-input
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF">
<p>Please enter the following information:</p>
<form name="form1" method="post" action="Clt_Searchact.cfm">
<p>Name:
<input type="text" name="Name">
<b> OR </b></p>
<p>CompanyName
<input type="text" name="CompanyName">
<b>OR</b></p>
<p>Phoneno:
<input type="text" name="Ph1">
</p>
<p>
<input type="submit" name="Submit" value="Submit">
<input type="reset" name="Submit2" value="Reset">
</p>
</form>
<p> </p>
</body>
</html>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>>>>>>The following code is for Indexing Data
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<cfquery name="GetResults" datasource="PRJreq" dbtype="ODBC">
SELECT Clt_Code, Clt_Name, Clt_CompanyName, Clt_Ph1, Clt_Email
FROM Client
</cfquery>
<cfindex action="Refresh"
collection="ClientSearch"
key="Clt_Name"
type="CUSTOM"
query="GetResults"
body="Clt_Name"
Title="Clt_Email"
Custom1="Clt_CompanyName"
Custom2="Clt_Ph1">
<html>
<head>
<title>Index Complete</title>
</head>
<body>
<h2><i><b>Index Complete</b></i></h2>
</body>
</html>
-----------------------------------------------
FREE! The World's Best Email Address @email.com
Reserve your name now at http://www.email.com
------------------------------------------------------------------------------
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.