请高手帮解决,asp多行多列显示分数!
时间:2011-06-28
来源:互联网

想把数据表中的数据,显示出来(多行多列)。
行为专家姓名,列为公司名称,数据为对应的评分。
单独运行查询,结果都正确,但再加入个循环,结果就不对,只显示第一组分数。
调试多次,不知错误在哪里?
请专家们帮我分析一下
<tr>
<td width="15%" height="30">公司名称(代号)</td>
<td width="10%"> </td>
<td> </td>
<td width="5%" align="center"> </td>
<% do while not rscompyScre.eof %>
<td align="center"><%=rscompyScre("company")%></td>
<%
compIdArr(i)=rscompyScre("compID")
rscompyScre.movenext
i = i + 1
loop
%>
</tr>
<%
set rst=rsfun("SELECT zhu.expertid, bao.id, bao.fen, ex.ena1, bao.biaoid, bao.zhuid FROM huizong where id=" & baoID,1)
rscompyScre.movefirst
rst.movefirst
do while not rst.eof
%>
'查询专家名
<%
set rs=rsfun("SELECT score, ena1 FROM fen, toubiaorecord AS tou, expert AS e WHERE e.id=fen.eid and fen.touid=tou.ids and eid="&rst("expertid")&" and companyid="&rscompyScre("compID")&" and bid=" & baoID,1)
do while not rs.eof
%>
’查询专家名和公司名对应的分数
<tr>
<td height="25"> </td>
<td> </td>
<td> </td>
<td align="center"><%=rs("ena1")%></td>
<% for i = 1 to compNum %>
<td align="center"> <%=rs("score")%></td>
<% next %>
</tr>
<%
rs.movenext
loop
rst.movenext
loop
%>
<%
rs.close
set rs=nothing
rst.close
set rst=nothing
%>
<%
end if
%>
<tr>
作者: giantjian 发布时间: 2011-06-28
<%
compIdArr(i)=rscompyScre("compID")
rscompyScre.movenext
i = i + 1
loop
%>
</tr>
<%
set rst=rsfun("SELECT zhu.expertid, bao.id, bao.fen, ex.ena1, bao.biaoid, bao.zhuid FROM huizong where id=" & baoID,1)
rscompyScre.movefirst
rst.movefirst
do while not rst.eof
%>
问题可能在这两个movefirst上。。注释掉调试下看看
compIdArr(i)=rscompyScre("compID")
rscompyScre.movenext
i = i + 1
loop
%>
</tr>
<%
set rst=rsfun("SELECT zhu.expertid, bao.id, bao.fen, ex.ena1, bao.biaoid, bao.zhuid FROM huizong where id=" & baoID,1)
rscompyScre.movefirst
rst.movefirst
do while not rst.eof
%>
问题可能在这两个movefirst上。。注释掉调试下看看
作者: aspwebchh 发布时间: 2011-06-28
我试过,不是这个错误,我感觉还是循环结构有问题?
作者: giantjian 发布时间: 2011-06-28
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28