Record set paging

Source: Internet
Author: User
Tags table name

Record set paging

 

. P_btns {margin: 10px 0 30px 0 ;}
. P_bar em {line-height: 26px ;}
. 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; height: 24px; line-height: 26px; 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-height: 26px ;}
. 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-height: 24px; 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; height: 17px ;}
. 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'' number of records per page
Int_totalsize = 0'' total number of records
StrWhere = "channelId =" & Int (Request. QueryString ("cid") 'Where condition
If StrWhere = "" Then StrWhere = "id> 0"
TableName = "jbsite_artlcle" ''table name
SelectFields = "title, author, content, channelID, classID" ''selected field
OrderFieldName = "id" ''sorting field
OrderType = "desc" ''sorting method
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
Loop part
Rs. MoveNext ()
Next
End If
Rs. Close
Set rs = Nothing
''Paging navigation
Response. Write (AutoGoPList (int_totalsize, int_pagesize, Int_ThisPage ))
%>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.