求助ASP 自动编号,
求助II自动累计,就是自动序号!不会改,现在序号都是1,没有累加!<tablewidth='100%'border='0'cellspacing='1'cellpaddi...
求助II 自动累计,就是自动序号!不会改,现在序号都是1,没有累加!
<table width='100%' border='0' cellspacing='1' cellpadding='0' bgcolor='#CCCCCC'>
<tr bgcolor='#FFFFFF' align='center'>
<td nowrap bgcolor='#FFFFFF'><b>序号</b></td>
<td nowrap bgcolor='#FFFFFF'>【类别】名称</td>
<td nowrap bgcolor='#FFFFFF'>品牌型号</td>
<td nowrap bgcolor='#FFFFFF'>规格</td>
<td nowrap bgcolor='#FFFFFF'>单位</td>
<td width="50" nowrap bgcolor='#FFFFFF'>图片</td>
<td nowrap bgcolor='#FFFFFF'>单价</td>
<td nowrap bgcolor='#FFFFFF'>数量</td>
<td nowrap bgcolor='#FFFFFF'>小计</td>
</tr>
<%
Dim prs
sql = "select op.count,op.InstantPrice,op.productid,(select title from {prefix}content where contentid=op.productid) as title,(select sortid from {prefix}content where contentid=op.productid) as sortid,(select P_PINGPAI from {prefix}content where contentid=op.productid) as P_PINGPAI,(select P_guige from {prefix}content where contentid=op.productid) as P_guige,(select p_danwei from {prefix}content where contentid=op.productid) as p_danwei,(select IndexImage from {prefix}content where contentid=op.productid) as IndexImage from {prefix}OrderProduct op where orderno='"&m_orderno&"' order by op.productid desc"
set prs = conn.exec(sql,"r1")
while not prs.eof
%>
<tr bgcolor='#FFFFFF' align='center'>
<% Dim ii
ii=1
%>
<td nowrap bgcolor='#FFFFFF'><a title='<%=prs("title")%>' href='../../../content/?<%=prs("productid")%>.html' target=_blank><%=ii%></a></td>
<%
Dim pps
sql ="select * from {prefix}sort where sortid ="&prs("sortid")&""
set pps = conn.exec(sql,"r1")
while not pps.eof
%>
<td nowrap bgcolor='#FFFFFF'><%=prs("sortid")%>【 <%=pps("sortname")%>】<a title='<%=prs("title")%>' href='../../../content/?<%=prs("productid")%>.html' target=_blank><%=prs("title")%></a></td>
<%
pps.movenext
wend
pps.close
set pps = nothing
%>
<td nowrap bgcolor='#FFFFFF'><a title='<%=prs("title")%>' href='../../../content/?<%=prs("productid")%>.html' target=_blank><%=prs("P_PINGPAI")%></a></td>
<td nowrap bgcolor='#FFFFFF'><a title='<%=prs("title")%>' href='../../../content/?<%=prs("productid")%>.html' target=_blank><%=prs("P_guige")%></a></td>
<td nowrap bgcolor='#FFFFFF'><a title='<%=prs("title")%>' href='../../../content/?<%=prs("productid")%>.html' target=_blank><%=prs("p_danwei")%></a></td>
<td nowrap bgcolor='#FFFFFF'><img src='<%=prs("IndexImage")%>' width='50' height='50' /></td>
<td nowrap bgcolor='#FFFFFF'><%=prs("InstantPrice")%>元</td>
<td nowrap bgcolor='#FFFFFF'><%=prs("count")%></td>
<td nowrap bgcolor='#FFFFFF'><%=prs("InstantPrice")* prs("count")%> 元</td>
</tr>
<%
prs.movenext
Ii = ii + 1
wend
prs.close
set prs = nothing
%>
</table> 展开
<table width='100%' border='0' cellspacing='1' cellpadding='0' bgcolor='#CCCCCC'>
<tr bgcolor='#FFFFFF' align='center'>
<td nowrap bgcolor='#FFFFFF'><b>序号</b></td>
<td nowrap bgcolor='#FFFFFF'>【类别】名称</td>
<td nowrap bgcolor='#FFFFFF'>品牌型号</td>
<td nowrap bgcolor='#FFFFFF'>规格</td>
<td nowrap bgcolor='#FFFFFF'>单位</td>
<td width="50" nowrap bgcolor='#FFFFFF'>图片</td>
<td nowrap bgcolor='#FFFFFF'>单价</td>
<td nowrap bgcolor='#FFFFFF'>数量</td>
<td nowrap bgcolor='#FFFFFF'>小计</td>
</tr>
<%
Dim prs
sql = "select op.count,op.InstantPrice,op.productid,(select title from {prefix}content where contentid=op.productid) as title,(select sortid from {prefix}content where contentid=op.productid) as sortid,(select P_PINGPAI from {prefix}content where contentid=op.productid) as P_PINGPAI,(select P_guige from {prefix}content where contentid=op.productid) as P_guige,(select p_danwei from {prefix}content where contentid=op.productid) as p_danwei,(select IndexImage from {prefix}content where contentid=op.productid) as IndexImage from {prefix}OrderProduct op where orderno='"&m_orderno&"' order by op.productid desc"
set prs = conn.exec(sql,"r1")
while not prs.eof
%>
<tr bgcolor='#FFFFFF' align='center'>
<% Dim ii
ii=1
%>
<td nowrap bgcolor='#FFFFFF'><a title='<%=prs("title")%>' href='../../../content/?<%=prs("productid")%>.html' target=_blank><%=ii%></a></td>
<%
Dim pps
sql ="select * from {prefix}sort where sortid ="&prs("sortid")&""
set pps = conn.exec(sql,"r1")
while not pps.eof
%>
<td nowrap bgcolor='#FFFFFF'><%=prs("sortid")%>【 <%=pps("sortname")%>】<a title='<%=prs("title")%>' href='../../../content/?<%=prs("productid")%>.html' target=_blank><%=prs("title")%></a></td>
<%
pps.movenext
wend
pps.close
set pps = nothing
%>
<td nowrap bgcolor='#FFFFFF'><a title='<%=prs("title")%>' href='../../../content/?<%=prs("productid")%>.html' target=_blank><%=prs("P_PINGPAI")%></a></td>
<td nowrap bgcolor='#FFFFFF'><a title='<%=prs("title")%>' href='../../../content/?<%=prs("productid")%>.html' target=_blank><%=prs("P_guige")%></a></td>
<td nowrap bgcolor='#FFFFFF'><a title='<%=prs("title")%>' href='../../../content/?<%=prs("productid")%>.html' target=_blank><%=prs("p_danwei")%></a></td>
<td nowrap bgcolor='#FFFFFF'><img src='<%=prs("IndexImage")%>' width='50' height='50' /></td>
<td nowrap bgcolor='#FFFFFF'><%=prs("InstantPrice")%>元</td>
<td nowrap bgcolor='#FFFFFF'><%=prs("count")%></td>
<td nowrap bgcolor='#FFFFFF'><%=prs("InstantPrice")* prs("count")%> 元</td>
</tr>
<%
prs.movenext
Ii = ii + 1
wend
prs.close
set prs = nothing
%>
</table> 展开
3个回答
AiPPT
2024-09-19 广告
2024-09-19 广告
随着AI技术的飞速发展,如今市面上涌现了许多实用易操作的AI生成工具1、简介:AiPPT: 这款AI工具智能理解用户输入的主题,提供“AI智能生成”和“导入本地大纲”的选项,生成的PPT内容丰富多样,可自由编辑和添加元素,图表类型包括柱状图...
点击进入详情页
本回答由AiPPT提供
展开全部
把
Dim ii
ii=1
放到 while not pps.eof 这句话前面去
Dim ii
ii=1
放到 while not pps.eof 这句话前面去
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你把它ii=1放到 while not prs.eof循环里了 每次都是重新赋值为1 怎么会累加那
听楼上的话 好好的把它放到循环外面
听楼上的话 好好的把它放到循环外面
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询