1. 论坛系统升级为Xenforo,欢迎大家测试!
    排除公告

请高手帮忙解决一个ASP+MSSQL的问题

本帖由 箭中2006-06-02 发布。版面名称:后端开发

  1. 箭中

    箭中 New Member

    注册:
    2006-05-12
    帖子:
    4
    赞:
    0
    我想修改一下这段代码,让调用出来的12个小表格每4个排成一行。现在的这段代码是12个小表都在一排里。哪位朋友帮忙修改一下,非常感谢!



    <table width="75%" border="0" cellpadding="5" cellspacing="0">
    <tr>
    <%set rs = conn.execute("select top 12 id,mc,dz,tel,email from qy_info where zt=1 and vip<>0 order by ding desc,id desc")
    do while not rs.eof%>
    <td width="220" align="center">
    <table width="210" border="0" cellpadding="2" cellspacing="1" bgcolor="#CCCCCC">
    <tr>
    <td height="22" valign="middle" bgcolor="#f1f1f1"><img src="../image/mail.gif" width="15" height="10"><a href="xiangxi.asp?id=<%=rs(0)%>" target="_blank"><%=rs(1)%></a></td>
    </tr>
    <tr>
    <td height="22" valign="middle" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td height="22" valign="middle" nowrap>地址:<%=rs(2)%></td>
    </tr>
    <tr>
    <td height="22" valign="middle">电话:<%=rs(3)%></td>
    </tr>
    <tr>
    <td height="22" valign="middle">信箱:
    <%if rs(4)<>"" then Response.Write rs(4) else Response.Write "<font color=#999999>暂无</font>"%></td>
    </tr>
    </table></td>
    </tr>
    </table></td>
    <%rs.movenext
    loop
    rs.close
    set rs=nothing
    conn.close
    set conn=nothing
    set s=nothing%>
    </tr>
    </table>
     
  2. 小叶

    小叶 New Member

    注册:
    2005-09-04
    帖子:
    17,941
    赞:
    33
  3. Tameway

    Tameway New Member

    注册:
    2005-09-06
    帖子:
    1,286
    赞:
    8
    写循环解决,原来有过很多这样的帖子,我给找找
     
  4. Tameway

    Tameway New Member

    注册:
    2005-09-06
    帖子:
    1,286
    赞:
    8