程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 網頁編程 >> ASP編程 >> 關於ASP編程 >> asp 指定讀取前幾條記錄

asp 指定讀取前幾條記錄

編輯:關於ASP編程

      <%dim sqlnote2
         sqlnote2="select top 8 * from note1 order by id desc"
         call opendb()
         rs.open sqlnote2,conn,1,1
         if not rs.eof then
         do while not rs.eof
        
         %>
                                            <tr>
                                              <td width="5" height="22" align="left" bgcolor="#FFFFFF"  >&nbsp;</td>
                                              <td width="169" height="27" align="left" bgcolor="#FFFFFF"  ><img src="index_files/dot_email.gif" width="5" height="5" />&nbsp;<a href="<%=rs("file_path")%>" target="_blank" class="prodcut" title="<%=rs("title")%>"><%=rs("title")%></a>&nbsp;&nbsp;
                <% if rs("send_date")=date() then
                 response.write("<img src=index_files/new1.gif />")
                 else response.write(rs("send_date"))
                 end if%></td>
                                              <td width="1" height="5" align="left" bgcolor="#FFFFFF"  >&nbsp;</td>
                                            </tr>
                                            <%
         rs.movenext
         loop%>
                                            <tr >
                                              <td colspan="3" align="right" bgcolor="#FFFFFF" ><a href="note.asp教程" class="page" >更多信息...</a>&nbsp;&nbsp;&nbsp;</td>
                                            </tr>
                                            <%
         else
         %>
                                            <tr  class="button3">
                                              <td colspan="3" bgcolor="#FFFFFF">暫時沒有通知通告</td>
                                            </tr>
                                            <%
         end if
         call closedb()
         %>


     

    1. 上一頁:
    2. 下一頁:
    Copyright © 程式師世界 All Rights Reserved