MACROMEDIA COLDFUSION 4.5-CFML LANGUAGE Bedienungsanleitung Seite 36

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 44
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 35
36 CHAPTER 30 Extending ColdFusion with CFX
Listing 30.7 (continued)
--->
<!---
Retrieve film information from database
--->
<cfquery datasource=”ows”
name=”GetFilms”>
SELECT * FROM Films
</cfquery>
<!---
Compute the standard deviation of the ratings for each film
--->
<CFX_ComputeStandardDeviation query=”GetFilms”
column=”RatingID”
variable=”FilmsStdDev”>
<!---
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 the standard deviation of the merchandise prices
--->
<CFX_ComputeStandardDeviation query=”GetMerch”
column=”MerchPrice”
variable=”MerchStdDev”>
<html>
<head>
<title>Orange Whip Statistics</title>
</head>
<body>
<h2>Orange Whip Statistics</h2>
<!---
Display the standard deviation
--->
<cfoutput>
<p>
Standard deviation of the films’ ratings:
<strong>#NumberFormat(FilmsStdDev, “0.00”)#</strong>
<br>
Seitenansicht 35
1 2 ... 31 32 33 34 35 36 37 38 39 40 41 42 43 44

Kommentare zu diesen Handbüchern

Keine Kommentare