Steve!

Finally something I can contribute to this wonderful list!

I am in fact working right now on the code to do just this.

I am assuming you already have a Verity collection with SomeName.  Then you need
to make a kind of on-the-fly collection out of a normal db query and call it
Dbquery

So on the search page, here is your Dbquery:

<!--Retrieve data from Db for onthefly collection-->
<cfquery name="GetSomeData" datasource="YourDatasource">
    SELECT Field1, Field2, Field3, Field4
    FROM SomeTable
</cfquery>

<!-- Now convert this data into a collectionto be queried with GetResults next
page-->
<CFINDEX ACTION="refresh"
    COLLECTION="OntheFlyCollection"
    KEY="Field1"
    URL="Field2"        
    TYPE="custom"
    TITLE="Field3"
    BODY="Field4"
    QUERY="GetSomeData">

Then on the search results page, 

<cfsearch
    name = "GetResults"
    collection = "SomeCollection, OntheFlyCollection"
    criteria = "#Form.Criteria#">

And that's it.  Two things to note, you actually have to create a collection
called OntheFlyCollection first, so that you can be refreshing it here on the
search page.

Also, notice that in the <CFINDEX> you are telling Verity which fields should be
considered what Verity values, so Field2 is your URL for instance - kind of
limiting, but don't forget you can make two custom tags!

HOpe this helps - got it all from p.733 of Forta and 
http://www.cfug-md.org/articles/verityvsslicedbread_final_draft.cfm

-Jason


___________________Reply Separator____________________
Subject:    Verity & SQL
Author: [EMAIL PROTECTED]
Date:       6/13/01 4:00 PM

Is there any way to combine the results of a CFSEARCH and a standard SQL
search into the same CFOUTPUT ... basically merge two queries?

Thanks
Steve


Development Manager
Vardus Internet Solutions (SA)

Tel: (+27) 21 670 9880
Fax: (+27) 21 674 4549

Email: [EMAIL PROTECTED]
Website: www.vardus.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to