home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 1999 April / APC443.iso / features / grpware / coldfus / coldfusi.exe / data1.cab / Documentation / snippets / cfcol.cfm < prev    next >
Encoding:
Text File  |  1998-10-08  |  1.1 KB  |  41 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>CFCOL Example</TITLE>
  14. </HEAD>
  15.  
  16. <BODY>
  17. <H3>CFCOL Example</H3>
  18.  
  19. <!--- Note the use of the HTMLTABLE attribute to display the
  20. CFTABLE as an HTML table, rather simply as PRE formatted information --->
  21. <CFTABLE QUERY="GetEmployees" STARTROW="1" COLSPACING="3" HTMLTABLE COLHEADERS>
  22. <!--- each CFCOL tag sets the width of a column in the table,
  23. as well as specifying the header information and the text/CFML
  24. with which to fill the cell --->
  25.     <CFCOL HEADER = "<B>ID</B>"
  26.         ALIGN = "Left"
  27.         WIDTH = 2
  28.         TEXT  = "#Emp_ID#">
  29.     <CFCOL HEADER = "<B>Name/Email</B>"    
  30.         ALIGN = "Left"
  31.         WIDTH = 15
  32.         TEXT  = "<a href='mailto:#Email#'>#FirstName# #LastName#</A>">
  33.     <CFCOL HEADER = "<B>Phone Number</B>"
  34.         ALIGN = "Center"
  35.         WIDTH = 15
  36.         TEXT  = "#Phone#">
  37. </CFTABLE>
  38.  
  39. </BODY>
  40. </HTML>       
  41.