CFOUTPUT

I l @ ve RuBoard

<CFOUTPUT>

Used with queries and variables to display information from ColdFusion. Before a user can see information that's been processed by ColdFusion, you must first use <cfoutput> to make that information visible to the user.

Syntax

 <cfoutput    query="nameofquery"   group="columntogroupby"   groupCaseSensitive="Yes" or "No"   startRow="rowtostarton"   maxRows="maximumrowstooutput"> </cfoutput> 

Attributes>

Query: Optional. This attribute specifies the recordset to be output. It corresponds to the name of the query in the <cfquery> tag.

Group: Optional. If you used the ORDER BY operator in your SQL statement to order the query by a specific field, like productID, the Group attribute will group the records together so all of the adjacent records will be removed.

GroupCaseSensitive: Optional. The default value is yes. This attribute determines whether or not the group attribute is case sensitive.

StartRow: This is the row on which you wish to start outputting your query.

MaxRows: Specifies the maximum number of rows output.

Example

For Variables:

 <!--- create a variable to hold the user's name --->  <cfset name = "Andrew Walter Schmidt"> <!--- Output the variable ---> <cfoutput>   #name# </cfoutput> 

For Query:

 <cfquery name="productlist" datasource="products">    SELECT *   FROM tblProducts </cfquery> <cfoutput query="productlist">   #ProductName#<br> </cfoutput> 
I l @ ve RuBoard


Macromedia ColdFusion 5. Training from the Source
Macromedia ColdFusion 5 Training from the Source (With CD-ROM)
ISBN: 0201758474
EAN: 2147483647
Year: 2002
Pages: 99
Authors: Kevin Schmidt

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net