熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> .NET編程 >> 正文

asp 指定讀取前幾條記錄

2013-11-13 10:40:50  來源: .NET編程 

  <%dim sqlnote
     sqlnote="select top * from note order by id desc"
     call opendb()
     rsopen sqlnoteconn
     if not rseof then
     do while not rseof
    
     %>
                                        <tr>
                                          <td width="" height="" align="left" bgcolor="#FFFFFF"  >&nbsp;</td>
                                          <td width="" height="" align="left" bgcolor="#FFFFFF"  ><img src="index_files/dot_emailgif" width="" height="" />&nbsp;<a href="<%=rs("file_path")%>" target="_blank" class="prodcut" title="<%=rs("title")%>"><%=rs("title")%></a>&nbsp;&nbsp;
            <% if rs("send_date")=date() then
             responsewrite("<img src=index_files/newgif />")
             else responsewrite(rs("send_date"))
             end if%></td>
                                          <td width="" height="" align="left" bgcolor="#FFFFFF"  >&nbsp;</td>
                                        </tr>
                                        <%
     rsmovenext
     loop%>
                                        <tr >
                                          <td colspan="" align="right" bgcolor="#FFFFFF" ><a href="noteasp教程" class="page" >更多信息</a>&nbsp;&nbsp;&nbsp;</td>
                                        </tr>
                                        <%
     else
     %>
                                        <tr  class="button">
                                          <td colspan="" bgcolor="#FFFFFF">暫時沒有通知通告</td>
                                        </tr>
                                        <%
     end if
     call closedb()
     %>

  
 


From:http://tw.wingwit.com/Article/program/net/201311/14281.html
    推薦文章
    Copyright © 2005-2013 電腦知識網 Computer Knowledge   All rights reserved.