Can you help me?

xiejunhua 2003-08-04 10:12:30
想把数据做二行显示,结果出错,帮忙看看这问题出在哪? 谢了。
<% do while not rst.EOF %>
<tr>
<td><% =rst("name") %></td>
<td><% =rst("price") %></td>
<% if not rst.EOF then
else
rst.MoveNext %>
<td><% =rst("name") %</td>
<td><% =rst("price") %></td>
<% end if %>
</tr>
<%
rst.MoveNext
Loop %>
...全文
46 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
xiejunhua 2003-08-04
  • 打赏
  • 举报
回复
怎么给分呀?
xiejunhua 2003-08-04
  • 打赏
  • 举报
回复
非常感谢。
xiejunhua 2003-08-04
  • 打赏
  • 举报
回复
I trying this
xiaobird1 2003-08-04
  • 打赏
  • 举报
回复
知道你的意思了,是一行显示两条记录吧,try this

i = 0
do while not rst.EOF
Response.write "<tr>"
do while i <= 1
Response.write "<td>"&rst("name")
Response.write "<td>"&rst("price")
if not rst.EOF then
rst.movenext
i = i + 1
else
exit do
end if
loop
Response.write "</tr>"
i = 0
rst.movenext
loop
xiejunhua 2003-08-04
  • 打赏
  • 举报
回复
只显示二例,做二行显示。
xiaobird1 2003-08-04
  • 打赏
  • 举报
回复
你想显示全部数据吗?
---------------------------------------
do while not rst.EOF
Response.write "<tr>"
Response.write "<td>"&rst("name")
Response.write "<td>"&rst("price")
Response.write "</tr>"
rst.movenext
loop
---------------------------------------
还是什么?
xiaobird1 2003-08-04
  • 打赏
  • 举报
回复
你想显示全部数据吗?
---------------------------------------
do while not rs.EOF
Response.write "<tr>"
Response.write "<td>"&rst("name")
Response.write "<td>"&rst("price")
Response.write "</tr>"
rst.movenext
loop
---------------------------------------
还是什么?
xiejunhua 2003-08-04
  • 打赏
  • 举报
回复
代码是这样,我刚打错了。
<% do while not rst.EOF %>
<tr>
<td><% =rst("name") %></td>
<td><% =rst("price") %></td>
<% if not rst.EOF then

rst.MoveNext %>
<td><% =rst("name") %</td>
<td><% =rst("price") %></td>
<% end if %>
</tr>
<%
rst.MoveNext
Loop %>

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧