高手帮忙把以下代码改成一行两列显示 谢谢

xmbiz 2008-10-30 11:31:56
高手帮忙把以下代码改成一行两列显示 谢谢

<%set rs=server.createobject("adodb.recordset")
sql="select * from SMT_ypxxtwo where SMT_ypxxone_id="&ypxxone_id&" order by SMT_date desc"
rs.open sql,conn,1,1%>
<tr>
<%n=0
do while not rs.eof
n=n+1
set rs1=server.createobject("adodb.recordset")
sql1="select * from SMT_yp where SMT_ypxxtwo_id="&rs("SMT_ypxxtwo_id")&" and SMT_key<>0 and SMT_key<>2 and SMT_key1=1"
rs1.open sql1,conn,1,1
twocount=rs1.recordcount
rs1.close%>
<tr><td height=25>  <a href=yp_list.asp?id=<%=rs("SMT_ypxxtwo_id")%>><%=rs("SMT_ypxxtwo")%></a> <font color=red>(<%=twocount%>)</font></td></tr>
<tr><td background="img/list_line_1.gif"></td></tr>
<%rs.movenext
loop
rs.close%>
...全文
106 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
-晴天 2008-10-30
  • 打赏
  • 举报
回复
<% set rs=server.createobject("adodb.recordset") 
sql="select * from SMT_ypxxtwo where SMT_ypxxone_id="&ypxxone_id&" order by SMT_date desc"
rs.open sql,conn,1,1 %>

<% n=0
do while not rs.eof
n=n+1
set rs1=server.createobject("adodb.recordset")
sql1="select * from SMT_yp where SMT_ypxxtwo_id="&rs("SMT_ypxxtwo_id")&" and SMT_key <>0 and SMT_key <>2 and SMT_key1=1"
rs1.open sql1,conn,1,1
twocount=rs1.recordcount
rs1.close %>
<tr> <td height=25>  <a href=yp_list.asp?id=<% =rs("SMT_ypxxtwo_id") %>> <% =rs("SMT_ypxxtwo") %> </a>  <font color=red>( <% =twocount %>) </font> </td>
<td background="img/list_line_1.gif"> </td> </tr>
<% rs.movenext
loop
rs.close %>
qiubin200236 2008-10-30
  • 打赏
  • 举报
回复
<%set rs=server.createobject("adodb.recordset")
sql="select * from SMT_ypxxtwo where SMT_ypxxone_id="&ypxxone_id&" order by SMT_date desc"
rs.open sql,conn,1,1%>
<tr>
<%n=0
do while not rs.eof
n=n+1
set rs1=server.createobject("adodb.recordset")
sql1="select * from SMT_yp where SMT_ypxxtwo_id="&rs("SMT_ypxxtwo_id")&" and SMT_key <>0 and SMT_key <>2 and SMT_key1=1"
rs1.open sql1,conn,1,1
twocount=rs1.recordcount
rs1.close%>
<tr> <td height=25>  <a href=yp_list.asp?id= <%=rs("SMT_ypxxtwo_id")%>> <%=rs("SMT_ypxxtwo")%> </a>  <font color=red>( <%=twocount%>) </font> </td>
<td background="img/list_line_1.gif"> </td> </tr>
<%rs.movenext
loop
rs.close%>

28,408

社区成员

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

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