MACROMEDIA COLDFUSION 4.5-CFML LANGUAGE Manuale Utente Pagina 41

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 44
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 40
41Returning Structures from CFX Tags
Listing 30.8 (continued)
<!---
Retrieve merchandise information from database
--->
<cfquery datasource=”ows”
name=”GetMerch”>
SELECT * FROM Merchandise
</cfquery>
<!---
Insert empty row to prove tag is smart enough to skip NULL values
--->
<cfset QueryAddRow(GetMerch)>
<!---
Compute statistics for the merchandise prices
--->
<CFX_ComputeStatistics query=”GetMerch”
column=”MerchPrice”
variable=”MerchStats”>
<html>
<head>
<title>Orange Whip Statistics</title>
</head>
<body>
<h2>Orange Whip Statistics</h2>
<!--- Display the statistics --->
<cfoutput>
<!--- First for films --->
<h3>Statistics for the film ratings</h3>
Number of data points:
<strong>#NumberFormat(FilmsStats[“Count”], “0”)#</strong>
<br>
Average (Mean):
<strong>#NumberFormat(FilmsStats[“Mean”], “,0.00”)#</strong>
<br>
Variance:
<strong>#NumberFormat(FilmsStats.Variance, “,0.00”)#</strong>
<br>
Standard Deviation:
<strong>#NumberFormat(FilmsStats.StandardDeviation, “,0.00”)#</strong>
<br>
<!--- Then for merchandise --->
<h3>Statistics for the merchandise prices</h3>
Number of data points:
<strong>#NumberFormat(MerchStats[“Count”], “0”)#</strong>
<br>
Average:
<strong>#NumberFormat(MerchStats[“Mean”], “,0.00”)#</strong>
<br>
Variance:
<strong>#NumberFormat(MerchStats.Variance, “,0.00”)#</strong>
Vedere la pagina 40
1 2 ... 36 37 38 39 40 41 42 43 44

Commenti su questo manuale

Nessun commento