Isquery - MACROMEDIA COLDFUSION MX 61-CFML Reference

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

Advertisement

IsQuery

Description
Determines whether value is a query.
Returns
True, if value is a query.
Category
Decision
functions,
Function syntax
IsQuery(value)
See also
QueryAddRow
Parameters
Parameter
value
Example
<!--- Shows an example of IsQuery and IsSimpleValue --->
<h3>IsQuery Example</h3>
<!--- define a variable called "GetEmployees" --->
<CFPARAM name = "GetEmployees" DEFAULT = "#Now()#">
<p>Before the query is run, the value of GetEmployees is
<cfoutput>#GetEmployees#</cfoutput>
<cfif IsSimpleValue(GetEmployees)>
<p>GetEmployees is currently a simple value
</cfif>
<!--- make a query on the snippets datasource --->
<cfquery name = "GetEmployees" datasource = "cfsnippets">
SELECT *
FROM employees
</cfquery>
<p>After the query is run, GetEmployees contains a number of rows
that look like this (display limited to three rows):
<cfoutput QUERY = "GetEmployees" MaxRows = "3">
<pre>#Emp_ID# #FirstName# #LastName#</pre>
</cfoutput>
<cfif IsQuery(GetEmployees)>
GetEmployees is no longer a simple value, but the name of a query
</cfif>
544
Chapter 3: ColdFusion Functions
Query functions
Description
Query variable

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents