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

  1. <!--- This example shows the use of CFCOL and CFTABLE
  2. to align information returned from a query --->
  3.  
  4. <!--- this query selects employee information from the
  5. snippets datasource --->
  6. <CFQUERY NAME="GetEmployees" DATASOURCE="cfsnippets">
  7. SELECT      Emp_ID, FirstName, LastName, EMail, Phone, Department
  8. FROM         Employees
  9. </CFQUERY>
  10.  
  11. <HTML>
  12. <HEAD>
  13. <TITLE>CFTABLE Example</TITLE>
  14. </HEAD>
  15.  
  16. <BODY>
  17. <H3>CFTABLE Example</H3>
  18. <!--- Note the use of the HTMLTABLE attribute to display the
  19. CFTABLE as an HTML table, rather simply as PRE formatted information --->
  20. <CFTABLE QUERY="GetEmployees" STARTROW="1" COLSPACING="3" HTMLTABLE COLHEADERS>
  21. <!--- each CFCOL tag sets the width of a column in the table,
  22. as well as specifying the header information and the text/CFML
  23. with which to fill the cell --->
  24.     <CFCOL HEADER = "<B>ID</B>"
  25.         ALIGN = "Left"
  26.         WIDTH = 2
  27.         TEXT  = "#Emp_ID#">
  28.     <CFCOL HEADER = "<B>Name/Email</B>"    
  29.         ALIGN = "Left"
  30.         WIDTH = 15
  31.         TEXT  = "<a href='mailto:#Email#'>#FirstName# #LastName#</A>">
  32.     <CFCOL HEADER = "<B>Phone Number</B>"
  33.         ALIGN = "Center"
  34.         WIDTH = 15
  35.         TEXT  = "#Phone#">
  36. </CFTABLE>
  37.  
  38. </BODY>
  39. </HTML>       
  40.