葉子分頁類1

2021-03-31 08:57:00 字數 885 閱讀 4775

id

標題內容(顯示前20個字)

時間<%

set ors=new cls_pages   '建立物件

ors.conn=conn    '得到資料庫連線

ors.recperpage=30 '每頁記錄條數

ors.cookiename="table1"    '存記錄總數的cookiesname

ors.pageurl=""    'showo_page.js的路徑

ors.term=0    '條件是否有變化(0無變化,1有變化,2不設定cookies也就是及時統計)

ors.sql="id,aaaa,bbbb,cccc$table1$$$id" '字段,表,條件(需要where),排序,主id

ireccount=ors.reccount() '記錄總數

irs=ors.resultset()    '返回resultset

if  ireccount<1 then%>

暫無記錄

<%

else    

for i=0 to ubound(irs,2)

bgcolor="#ffffff"

if i mod 2=0 then bgcolor="#dfefff"

%>

">

<%=irs(0,i)%>

<%=irs(1,i)%>

<%=left(irs(2,i),20)%>

<%=irs(3,i)%>

<%

next 

end if

%>

<%ors.showpage()%>

<%

irs=null

ors=null

set ors=nothing

%>

CI框架分頁類的使用 1

首先,要查詢資料庫,確定一共有多少條資料 this load model test model user this test model user select all pageall count user 總條數 pagenum 20 每頁顯示的條數 其次,進行config的配置 config t...

才子分頁類

取文章總數及每頁重複顯示條數,準備分頁 wzcount 文章總數 wzrep 重複顯示條數 wzpage 分頁引數id wzpagecount 總頁數 dim wzcount,wzrep,wzpage,wzpagecount,wzpagerep,boardstr wzrep 30 rssql sel...

簡易分頁類

這是乙個簡單易用的分頁類。只需在你原有的程式中加兩句 改一句就可以了 先貼 paging.php php code phpclass paging static function bar tpl echo tpl 通常你都有類似這樣的語句 sql rs mysql query sql 或 rs my...