> Below is the code that does the index, and the cfsearch code that reads > > The index: > > <cfquery name="Qryname" datasource="dsnnane"> > SELECT id, eid, title > FROM tbl1 > </cfquery> > > <cfindex > query="Qryname" > collection="events" > action="Update" > type="Custom" > title="title" > key="id" > body="eid,title"> > > Search Results > > <cfsearch > collection="events" > name="Qryname" > criteria="#Form.Criteria#"> > > <!--- Output the record set. ---> > <cfoutput> > Your search returned #Qryname.RecordCount# result(s). > </cfoutput> > > <cfoutput query="Qryname"> > <a href="page.cfm?eid=#eid#">#title#</a> > > </cfoutput> > > I get an error saying that eid is not defined.
Verity doesn't store your database columns directly. You have both eid and title in the body, and that gets stored as one thing. If you want to access a specific database column, use one of the CUSTOM attributes (CUSTOM1, CUSTOM2) and store the eid column in that in your CFINDEX tag, then reference CUSTOM1 (or CUSTOM2) in your output. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342017 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm