Time:
Scotland: Fri, 8:57 pm
Rhode Island: Fri, 3:57 pm
Florida: Fri, 3:57 pm
New Mexico: Fri, 1:57 pm
California: Fri, 12:57 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.

CLICK HERE TO GET AUCTION BAR NOW
US$10 per year - Save $100s!
The Fabulously Unfair
WebX Auction Bar. For Ebay etc.
Ro-Sham-Bo the opposition. Laugh like Eric Cartman when you win! CLICK HERE NOW!


More information and sign-up.

WebXpertz Hosting.
Custom fit from $5pm. PHP/MySQL
You'll save money, we'll save money. Seems fair to me. Interested? If so Please PM me here and tell me what you need. Thanks!


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