Time:
Scotland: Sat, 6:45 am
Rhode Island: Sat, 1:45 am
Florida: Sat, 1:45 am
New Mexico: Fri, 11:45 pm
California: Fri, 10:45 pm

Click here to visit Livelife365.com

Click here to visit nmdarts.com



Buy this Ad Space.

180px wide.

Please get in touch with KH@ if you are interested and make an offer.

Selanac Embroidery and Screen Printing

Embroidery
Screen Printing
Signs and Banners
Promotional Advertising

WEBSITE

Contact Paul Canales
TEl: USA 732-901-8417
CELL: USA 732-773-1339


Please click here for more information


For continued disscussion on this topic : * Verity Search Problems - Only Returns Last Record Matching Criteria


crazydiamond
11-13-2003, 01:22 AM
Im slowly building a ColdFusion Verity Search feature and it is not going very well.

I have made it so the user can enter in search criteria and the site searches for all the database records matching that criteria - however when it comes to displaying the results only the last database record matching the search criteria is displayed. I want ALL of the database records meeting the search criteria to be displayed.

For example - i have a field by the name of "enteredBy" and it has a number of entries containing "Bob" - theres about 6 or 7 of them. The search only picks up and displays the last entry that Bob made in the database and not all of the entries that he made.

My code is as follows:

searchprocess.cfm:

<cfsearch collection="advertisements" name="findItems" criteria="#keywords#" type="simple">

<cfset searchList = finditems.key>
<cfquery name="UseVerityResults" datasource="advertisements">

Select * from ads where adnumber = #searchList#

</cfquery>
<P>
<cfoutput query="UseVerityResults">

#sellername#, #adverttitle#

</cfoutput>

----------------

The following file indexes all of the ads and indexes them in a verity collection called 'advertisements':

<CFQUERY NAME="GetAdvertisements" datasource="advertisements">
SELECT *
FROM ads
</CFQUERY>

<!--- Output the result set --->
<CFOUTPUT QUERY="GetAdvertisements">
#adnumber#,#category#,#region#,#expirydate#,#dateentered#,#emailaddress#,#advertisementcontents#,#se llername#,#adverttitle#
</CFOUTPUT>

<!--- Index the result set --->
<CFINDEX COLLECTION="Advertisements"
ACTION="UPDATE"
BODY="adnumber,sellername,adverttitle,emailaddress,dateentered,expirydate,advertisementcontents,category,r egion"
KEY="adnumber"
TITLE="Adverttitle"
QUERY="GetAdvertisements">

----------------

Does anyone have any ideas?

Cheers