home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 February / CHIPCD_02_2002.iso / Internet / Macromedia ColdFusion Server 5 / coldfusion-50-win-us.exe / data1.cab / Examples / CFDOCS / snippets / issimplevalue.cfm < prev    next >
Encoding:
Text File  |  2001-06-13  |  1.0 KB  |  39 lines

  1. <!--- Shows an example of IsQuery and IsSimpleValue --->
  2. <HTML>
  3. <HEAD>
  4. <TITLE>IsSimpleValue Example</TITLE>
  5. </HEAD>
  6.  
  7. <BASEFONT FACE="Arial, Helvetica" SIZE=2>
  8. <BODY  bgcolor="#FFFFD5">
  9. <H3>IsSimpleValue Example</H3>
  10.  
  11. <!--- define a variable called "getEmployees" --->
  12. <CFPARAM name="getEmployees" default="#Now()#">
  13.  
  14. <P>Before the query is run, the value of GetEmployees is
  15. <CFOUTPUT>#getEmployees#</CFOUTPUT>
  16.  
  17. <CFIF IsSimpleValue(getEmployees)>
  18. <P>getEmployees is currently a simple value
  19. </CFIF>
  20.  
  21. <!--- make a query on the snippets datasource --->
  22. <CFQUERY NAME="getEmployees" DATASOURCE="cfsnippets">
  23. SELECT *
  24. FROM Employees
  25. </CFQUERY> 
  26.  
  27. <P>After the query is run, GetEmployees contains a number of
  28. rows that look like this (display limited to three rows):
  29. <CFOUTPUT QUERY="GetEmployees" MAXROWS="3">
  30. <PRE>#Emp_ID# #Trim(FirstName)# #LastName#</PRE>
  31. </CFOUTPUT>
  32.  
  33. <CFIF IsQuery(getEmployees)>
  34. GetEmployees is no longer a simple value, but the name of a query
  35. </CFIF>
  36.  
  37. </BODY>
  38. </HTML>       
  39.