| CFML Reference
|
|
ColdFusion Functions
|
IsSimpleValue
Description
Returns TRUE if value is a string, number, Boolean, or date/time value.
Category
Decision functions
Syntax
IsSimpleValue(value)
Parameters
| Parameter |
Description |
value
|
Variable or expression
|
Example <!--- Shows an example of IsQuery and IsSimpleValue --->
<html>
<head>
<title>IsSimpleValue Example</title>
</head>
<body bgcolor = silver>
<H3>IsSimpleValue 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>
</body>
</html>
|
Copyright © 2001, Macromedia Inc. All rights reserved. |
|
|