一聚教程网:一个值得你收藏的教程网站

热门教程

记录集分页的问题

时间:2022-07-02 23:21:09 编辑:袖梨 来源:一聚教程网

记录集分页的问题

 

.p_btns { margin: 10px 0 30px 0; }
.p_bar em { line- }
.p_bar a {color: #6774A8; text-decoration:none;}
.p_bar a:hover {text-decoration:underline;}
.p_bar a:link {text-decoration:none;}
.p_bar a:active {text-decoration:underline;}
.p_bar a:visited {text-decoration:none;}
.p_bar {float: left; border: 1px solid #CAD9EA; background: #F7F7F7; line- color: #999; overflow: hidden; }
.p_bar a, .p_bar strong, .p_bar em, .p_bar kbd, #multipage .p_bar em { float: left; padding: 0 8px; line- }
.p_bar a:hover { background-color: #FFF; }
.p_bar strong { font-weight: bold; color: #090; background: #CAD9EA; }
.p_bar a.prev, .p_bar a.next { line- font-family: Verdana, Arial, Helvetica, sans-serif; } 
.p_bar a.next { padding: 0 15px; }
.p_bar kbd { border-left: 1px solid #CAD9EA; margin: 0; }
* html .p_bar kbd { padding: 1px 8px; }
.p_bar kbd input { border: 1px solid #CAD9EA; margin-top: 3px !important; * > margin-top: 1px  !important; margin: 1px 4px 0 3px; padding: 0 2px; }
.p_bar kbd>input { margin-bottom: 2px; }

 

<%
        Dim StrWhere, Int_ThisPage,int_pagesize,int_totalsize,TableName,SelectFields,OrderFieldName,OrderType
        Int_ThisPage = Request.QueryString("page")
        int_pagesize = 50 ''每页记录数
         int_totalsize = 0 ''记录总数
         StrWhere = "channelId=" & Int(Request.QueryString("cid"))   'where条件
         If StrWhere = "" Then StrWhere="id>0"
        TableName = "jbsite_artlcle" ''表名称
         SelectFields = "title,author,content,channelID,classID" ''选择的字段
        OrderFieldName ="id" ''排序字段
        OrderType="desc" ''排序方式
        Dim i, rs, sql
        Set rs = Conn.Execute("SELECT count(*) FROM [" & TableName & "] Where " & StrWhere)      
        int_totalsize = rs(0)
        Set rs = Nothing
        Set rs = Server.CreateObject("adodb.recordset")
        sql = Jumbot.GetSql("*",TableName, OrderFieldName, int_pagesize, Int_ThisPage, OrderType, StrWhere)
        rs.Open sql, Conn, 1, 1
        If Not rs.EOF Then
                For i = 1 To rs.recordcount
                        循环部分
                        rs.MoveNext()
                Next
        End If
        rs.Close
        Set rs = Nothing
''分页导航
Response.Write(AutoGoPList(int_totalsize, int_pagesize, Int_ThisPage))
%>

热门栏目