MACROMEDIA COLDFUSION MX 61-CFML Reference page 310

Cfml reference
Hide thumbs Also See for COLDFUSION MX 61-CFML:
Table of Contents

Advertisement

You can use query result columns in standard CFML expressions, preceding the result column
name with the name of the query, as follows:
#DocSearch.url#
#DocSearch.key#
#DocSearch.title#
#DocSearch.score#
Example
<!--- #1 (TYPE=SIMPLE) ----------------------------->
<cfsearch
name="name"
collection="snippets,syntax,snippets"
criteria="example" >
<p>
<cfoutput>Search Result total =
<cfoutput>
url=#name.url#<br>
key=#name.key#<br>
title=#name.title#<br>
score=#name.score#<br>
custom1=#name.custom1#<br>
custom2=#name.custom2#<br>
summary=#name.summary#<br>
recordcount=#name.recordcount#<br>
currentrow=#name.currentrow#<br>
columnlist=#name.columnlist#<br>
recordssearched=#name.recordssearched#<br>
</cfoutput>
<cfdump var = #name#>
<br>
<!--- #2 (TYPE=EXPLICIT) ----------------------------->
<cfsearch
name = "snippets"
collection = "snippets"
criteria = '<wildcard>`film{ing,ed}`'
type="explicit"
startrow=1>
<cfoutput
query="snippets">
url=#url#<br>
key=#key#<br>
title=#title#<br>
score=#score#<br>
custom1=#custom1#<br>
custom2=#custom2#<br>
summary=#summary#<br>
recordcount=#recordcount#<br>
currentrow=#currentrow#<br>
columnlist=#columnlist#<br>
recordssearched=#recordssearched#<br>
</cfoutput>
<cfdump var = #snippets#>
<br>
<!--- #3 (search by CF key) ----------------------------->
<cfsearch
name = "book"
collection = "custom_book"
310
Chapter 2: ColdFusion Tags
#name.RecordCount# </cfoutput><br>

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents