home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 1999 April / APC443.iso / features / grpware / coldfus / coldfusi.exe / data1.cab / Documentation / snippets / isquery.cfm < prev    next >
Encoding:
Text File  |  1998-10-08  |  970 b   |  37 lines

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