Shadow Wizard は、このコードを表示するのに役立ちます:
<%
Set oRS= TarefasConexaoMSSQL.Execute("SELECT * FROM apptabela ORDER BY oito ASC")
Dim currentGroupName, previousGroupName
currentGroupName = ""
previousGroupName = ""
Do Until oRS.EOF
currentGroupName = oRS("oito")
One = oRS("um")
Two = oRS("dois")
If currentGroupName<>previousGroupName Then
Response.Write("<p>")
Response.Write("<a href='#'>" & currentGroupName & "</a>")
Response.Write("</p>")
End If
Response.Write("- One: " & One & ", Two: " & Two & "<br />")
previousGroupName = currentGroupName
oRS.MoveNext
Loop
oRS.Close
%>
次のようなものを生成しています:
1000
- 1:りんご、2:梨
- 1:ボークス、2:レクサス
1001
- 1: 車、2: ボート
1002
- 1: ニワトリ、2: 牛
- One: ペン、Two: 鉛筆
- 1: C#、2: C++
私が望むのは、合計のように、各グループの下部に行を追加することです。これにより、後でいくつかの計算を行うことができます。
1000
- 1:りんご、2:梨
- 1:ボークス、2:レクサス
- 合計: X、Y
1001
- 1: 車、2: ボート
- 合計: X、Y
1002
- 1: ニワトリ、2: 牛
- One: ペン、Two: 鉛筆
- 1: C#、2: C++
- 合計: X、Y
ありがとう