こんにちは、私は次のことを試みています:
コードは ASP で記述され、出力はデータベースからのものです。QTY と RATE#2 を掛けて、返されたデータに各注文の合計を表示しようとしています。これは、出力の最後の td に関連しています。
<td align="center" height="30"><%= rowCrossHire("NLCODE") %></td>
<td align="center" height="30"><%= rowCrossHire("QTY") %></td>
<td align="center" height="30"><%= rowCrossHire("QTYRETD") %></td>
<td align="center" height="30"><%= formatcurrency(rowCrossHire("RATE#1"), 2) %></td>
<td align="center" height="30"><%= need to add "QTY" * "RATE#1" here %></td>
他に必要なことがあれば教えてください 事前に感謝します デビッド
<table>
<%
crosshireSQL = "SELECT CONTITEMS.CONTNO, CONTITEMS.ITEMDESC, CONTITEMS.ITEMDESC#2, CONTITEMS.RATE#1, CONTITEMS.ITEMDESC#3, CONTITEMS.ITEMNO, CONTITEMS.NLCODE, CONTITEMS.QTY, CONTITEMS.QTYRETD, CONTITEMS.STATUS, CONTRACTS.ACCTNAME FROM CONTITEMS INNER JOIN CONTRACTS ON CONTRACTS.CONTNO = CONTITEMS.CONTNO WHERE CONTITEMS.NLCODE IN ('4001') AND CONTITEMS.STATUS = 1 ORDER BY CONTITEMS.CONTNO ASC, CONTITEMS.ITEMNO ASC"
set rowCrossHire = returnRecordSet(crosshireSQL)
currentContract = ""
if not rowCrossHire.eof then
' cross hires found
do while not rowCrossHire.eof
' loop through cross hires
if currentContract <> rowCrossHire("CONTNO") then
' new contract
%>
<tr class="contract">
<th colspan="11"> </th>
</tr>
<%
currentContract = rowCrossHire("CONTNO")
end if
sonNo = "Pre SONs"
sonSQL = "SELECT SONID, SONRevision FROM SONs WHERE SONContractNo LIKE '%" & rowCrossHire("CONTNO") & "%' ORDER BY SONID ASC LIMIT 1"
set rowSON = returnRecordSetOnline(sonSQL)
if not rowSON.eof then
' son found
sonRevision = ""
if cint(rowSON("SONRevision")) > 0 then
' son revision found
sonRevision = chr((cint(rowSON("SONRevision")) + 96))
end if
sonNO = "<a href=""http://admin.boilerrentalservices.co.uk/sons/list/view-menu.php?SONID=" & rowSON("SONID") & """ target=""_blank"" title=""View " & rowSON("SONID") & sonRevision & """>" & rowSON("SONID") & sonRevision & "</a>"
end if
itemDescription = rowCrossHire("ITEMDESC")
if trim(rowCrossHire("ITEMDESC#2")) <> "" then
' additional description
itemDescription = itemDescription & ", " & rowCrossHire("ITEMDESC#2")
end if
if trim(rowCrossHire("ITEMDESC#3")) <> "" then
' additional description
itemDescription = itemDescription & ", " & rowCrossHire("ITEMDESC#3")
end if
%>
<tr>
<td height="30"><a href="/dashboard-fullscreen/individual/contracts/view.asp?Allow=f875eba085941cc78509bd3482dc0294&Contract=<%= rowCrossHire("CONTNO") %>" target="_blank" title="View <%= rowCrossHire("CONTNO") %>"><%= rowCrossHire("CONTNO") %></a></td>
<td height="30"><%= sonNo %></td>
<td height="30"><%= rowCrossHire("ACCTNAME") %></td>
<td height="30"><%= rowCrossHire("ITEMNO") %></td>
<td height="30"><%= itemDescription %></td>
<td align="center" height="30"><%= getItemStatus(rowCrossHire("STATUS")) %></td>
<td align="center" height="30"><%= rowCrossHire("NLCODE") %></td>
<td align="center" height="30"><%= rowCrossHire("QTY") %></td>
<td align="center" height="30"><%= rowCrossHire("QTYRETD") %></td>
<td align="center" height="30"><%= formatcurrency(rowCrossHire("RATE#1"), 2) %></td>
<td align="center" height="30"><%= need to add "QTY" * "RATE#1" here %></td>
</tr>
<%
rowCrossHire.movenext
loop
end if
%>
<tr class="contract">
<th colspan="11"> </th>
</tr>
</table>