ASP表格循环显示数值时,怎么显示对应另一个表中字段值? 15
数据库为sql2000,ba_paytype表中有vccode字段值等于ba_account表中的vcpaytype字段值<td><%=list("vcpaytype")...
数据库为sql2000,ba_paytype 表中有vccode字段值 等于 ba_account表中的vcpaytype字段值
<td><%=list("vcpaytype")%></td> 这个地方怎么显示vcpaytype值等于ba_paytype表中vccode值对应的vcname值?
<%
dim bgtime,ovtime
bgtime=request.Form("bgtime")
ovtime=request.Form("ovtime")
%>
<%set list=conn.execute("select * from ba_account where dttime>='"&bgtime&"' and dttime<='"&ovtime&"' order by [vcreckno]")%>
<%set hmmoney=conn.execute("select sum(mmoney) from ba_account where dttime>='"&bgtime&"' and dttime<='"&ovtime&"' ")%>
<table border=1 cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
<tr>
<th nowrap="nowrap"><span class="STYLE3">付款方式</span></th>
<th nowrap="nowrap"><span class="STYLE3">单据号</span></th>
</tr>
<%do while not list.eof%>
<tr>
<td><%=list("vcpaytype")%></td> 这个地方想改成显示vcpaytype等于ba_paytype表中vccode对应的vcname,怎么改呢?
<td><%=list("vcreckno")%></td>
</tr>
<%
list.movenext
loop
%>
<tr>
<td colspan="8">合计:</td>
<td><strong><%=hmconsume("")%></strong></td>
<td><strong><%=hmagio("")%></strong></td>
</tr>
</table>
谢谢啦,,非常感谢!!!!我分不多啊,总分15,全给了!!!! 展开
<td><%=list("vcpaytype")%></td> 这个地方怎么显示vcpaytype值等于ba_paytype表中vccode值对应的vcname值?
<%
dim bgtime,ovtime
bgtime=request.Form("bgtime")
ovtime=request.Form("ovtime")
%>
<%set list=conn.execute("select * from ba_account where dttime>='"&bgtime&"' and dttime<='"&ovtime&"' order by [vcreckno]")%>
<%set hmmoney=conn.execute("select sum(mmoney) from ba_account where dttime>='"&bgtime&"' and dttime<='"&ovtime&"' ")%>
<table border=1 cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
<tr>
<th nowrap="nowrap"><span class="STYLE3">付款方式</span></th>
<th nowrap="nowrap"><span class="STYLE3">单据号</span></th>
</tr>
<%do while not list.eof%>
<tr>
<td><%=list("vcpaytype")%></td> 这个地方想改成显示vcpaytype等于ba_paytype表中vccode对应的vcname,怎么改呢?
<td><%=list("vcreckno")%></td>
</tr>
<%
list.movenext
loop
%>
<tr>
<td colspan="8">合计:</td>
<td><strong><%=hmconsume("")%></strong></td>
<td><strong><%=hmagio("")%></strong></td>
</tr>
</table>
谢谢啦,,非常感谢!!!!我分不多啊,总分15,全给了!!!! 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询