MACROMEDIA COLFUSION MX 7-CFML Reference page 240

Cfml reference
Hide thumbs Also See for COLFUSION MX 7-CFML:
Table of Contents

Advertisement

title=#mySearch.title#<br />
context=#mySearch.context#<br />
url=#mySearch.url#<br />
</cfoutput>
<!--- EXAMPLE #4 Index a FILE within a QUERY (type= "file"). --------------->
<!--- Retrieve row with a column that contains a filename (Contract_File). --->
<cfquery name="getEmps" datasource="cfdocexamples">
SELECT * FROM EMPLOYEE WHERE EMP_ID = 1
</cfquery>
<!--- Update the collection with the above query results. --->
<!--- key specifies the column that contains a complete filename. --->
<!--- file is indexed in same way as if no query involved. --->
<cfindex
query="getEmps"
collection="CodeColl"
action="Update"
type="file"
key="Contract_File"
title="Contract_File"
body="Emp_ID,FirstName,LastName,Contract_File">
<h2>Indexing Complete</h2>
<cfsearch
name = "mySearch"
collection = "CodeColl"
criteria = "vacation"
contextpassages = "1"
maxrows = "100">
<cfoutput>
key=#mySearch.key#<br />
title=#mySearch.title#<br />
context=#mySearch.context#<br />
url=#mySearch.url#<br />
</cfoutput>
<!--- EXAMPLE # 5 Index a PATH within a QUERY. ---------------------------->
<!--- Retrieve a row with a column that contains a path (Project_Docs). --->
<cfquery name="getEmps" datasource="cfdocexamples">
SELECT * FROM EMPLOYEE WHERE Emp_ID = 15
</cfquery>
<!--- Update the collection with the above query results. --->
<!--- key specifies a column that contains a directory path. --->
<!--- path is indexed in same way as if no query involved. --->
<cfindex
query="getEmps"
collection="CodeColl"
action="update"
type="path"
key="Project_Docs"
title="Project_Docs"
body="Emp_ID,FirstName,LastName,Project_Docs">
240
Chapter 2: ColdFusion Tags

Advertisement

Table of Contents
loading

This manual is also suitable for:

Colfusion mx 7 - installing and using coldfusion mx

Table of Contents