I am using Verity to search database fields. I've used record count to find out how many records were found during the search. It says 2 when I enter the key word 'stock options' (with out the quotes), but only one record appears.
To see what I'm talking about, enter 'stock options' (without the quotes) into the text box at the site below.
Here is CFML for my search page:
================================
<html>
<head>
<CFQUERY NAME="Search" DATASOURCE="myjobcoach" BLOCKFACTOR="100">SELECT * FROM Content_Database WHERE Show LIKE '%Yes%'</CFQUERY>
<CFQUERY NAME="Design" DATASOURCE="myjobcoach" BLOCKFACTOR="100">SELECT Client_Name, Title, Font, Body_Attribute1, Body_Attribute2, Body_Attribute3, Body_Attribute4, Header, SearchResults_Body, Footer FROM Site_Structure WHERE Client_Name LIKE '%#Form.Client_Name#%'</CFQUERY>
<CFINDEX ACTION="REFRESH" COLLECTION="Search" KEY="ID" type="CUSTOM" TITLE="Headline" QUERY="Search" BODY="Body" LANGUAGE="English">
<CFSEARCH NAME="SearchDB" COLLECTION="Search" TYPE="Simple" CRITERIA="#Form.Keywords#" LANGUAGE="English">
<title></title>
</head>
<CFOUTPUT QUERY="Design"><body bgcolor="#Body_Attribute1#" link="#Body_Attribute2#" alink="#Body_Attribute3# vlink="#Body_Attribute4#">
<font face="#Font#">
#Header#
<div align="center"><font size="3">Your search for <b>"#Form.Keywords#"</b> returned #SearchDB.RecordCount# result(s)</font></div><br>
<CFIF SearchDB.RecordCount EQ "0">
There are no articles to display.<br><br>
<CFELSE>
<a href="display_article.cfm?ID=#SearchDB.Key#&Client_Name=#Design.Client_Name#"><b>#SearchDB.Title#</b></a><br><i>#SearchDB.Summary#</i>
</CFIF><br>
#Footer#</font>
</body></CFOUTPUT>
</html>
================================
[sig]<p>Ryan ;-]<br>[/sig]
To see what I'm talking about, enter 'stock options' (without the quotes) into the text box at the site below.
Here is CFML for my search page:
================================
<html>
<head>
<CFQUERY NAME="Search" DATASOURCE="myjobcoach" BLOCKFACTOR="100">SELECT * FROM Content_Database WHERE Show LIKE '%Yes%'</CFQUERY>
<CFQUERY NAME="Design" DATASOURCE="myjobcoach" BLOCKFACTOR="100">SELECT Client_Name, Title, Font, Body_Attribute1, Body_Attribute2, Body_Attribute3, Body_Attribute4, Header, SearchResults_Body, Footer FROM Site_Structure WHERE Client_Name LIKE '%#Form.Client_Name#%'</CFQUERY>
<CFINDEX ACTION="REFRESH" COLLECTION="Search" KEY="ID" type="CUSTOM" TITLE="Headline" QUERY="Search" BODY="Body" LANGUAGE="English">
<CFSEARCH NAME="SearchDB" COLLECTION="Search" TYPE="Simple" CRITERIA="#Form.Keywords#" LANGUAGE="English">
<title></title>
</head>
<CFOUTPUT QUERY="Design"><body bgcolor="#Body_Attribute1#" link="#Body_Attribute2#" alink="#Body_Attribute3# vlink="#Body_Attribute4#">
<font face="#Font#">
#Header#
<div align="center"><font size="3">Your search for <b>"#Form.Keywords#"</b> returned #SearchDB.RecordCount# result(s)</font></div><br>
<CFIF SearchDB.RecordCount EQ "0">
There are no articles to display.<br><br>
<CFELSE>
<a href="display_article.cfm?ID=#SearchDB.Key#&Client_Name=#Design.Client_Name#"><b>#SearchDB.Title#</b></a><br><i>#SearchDB.Summary#</i>
</CFIF><br>
#Footer#</font>
</body></CFOUTPUT>
</html>
================================
[sig]<p>Ryan ;-]<br>[/sig]