MACROMEDIA COLDFUSION 4.5-CFML LANGUAGE Instrukcja Użytkownika Strona 41

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 44
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 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>
Przeglądanie stron 40
1 2 ... 36 37 38 39 40 41 42 43 44

Komentarze do niniejszej Instrukcji

Brak uwag