Guest_imported
New member
- Jan 1, 1970
- 0
Can someone please clearify something for me?
I have the following data
FirstName LastName telephone adress
1.Jenny Smith 411 1234 Jenny street
2.Karen Benson 511 4553 Jenny Street
3.Jenny Roberts 611 13432 George Ave
I have the following code.
<cfquery datasource = "something" name="other">
Select firstName, lastName, telephone, address
From CustomerTable
</cfquery>
<cfindex collection="example" action="Refresh" type="Custom" title="test" Key="lastName" body="firstName,lastName,telephone,address" query="other" custom1="firstName" custom2="lastName">
<cfsearch Name="searchInfo" collection="example" type="Explicit" criteria="CF_CUSTOM1 <SUBSTRING> Jenny">
I thought the above cfsearch statement should only return records that contains "Jenny" in the firstName field, in the above case, it should return record 1 and record 3. However, when I use it, it returns record(s) that contains "Jenny" in firstName, lastName, telephone or address, in the above case records 1, 2 and 3.
Can someone please help me out. What should I do, if I only want record(s) that contains "Jenny" in the lastName (custom1) field. In the above case, only return record 1 and 3. Not record 2, since Jenny is not in the firstName field.
Thank you very much.
I have the following data
FirstName LastName telephone adress
1.Jenny Smith 411 1234 Jenny street
2.Karen Benson 511 4553 Jenny Street
3.Jenny Roberts 611 13432 George Ave
I have the following code.
<cfquery datasource = "something" name="other">
Select firstName, lastName, telephone, address
From CustomerTable
</cfquery>
<cfindex collection="example" action="Refresh" type="Custom" title="test" Key="lastName" body="firstName,lastName,telephone,address" query="other" custom1="firstName" custom2="lastName">
<cfsearch Name="searchInfo" collection="example" type="Explicit" criteria="CF_CUSTOM1 <SUBSTRING> Jenny">
I thought the above cfsearch statement should only return records that contains "Jenny" in the firstName field, in the above case, it should return record 1 and record 3. However, when I use it, it returns record(s) that contains "Jenny" in firstName, lastName, telephone or address, in the above case records 1, 2 and 3.
Can someone please help me out. What should I do, if I only want record(s) that contains "Jenny" in the lastName (custom1) field. In the above case, only return record 1 and 3. Not record 2, since Jenny is not in the firstName field.
Thank you very much.