<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    acerbic coffee
    走自己的路,讓別人跑步
    posts - 26,comments - 14,trackbacks - 0
    一 前提
    希望最新的紀錄在開頭給你的表建立查詢:
    表:mytable
    查詢:create or replace view as mytable_view from mytable order by id desc 其中,最好使用序列號create sequence mytable_sequence 來自動增加你的紀錄id號

    二 源程序
    <%String sConn="你的連接"
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection conn=DriverManager.getConnection(sConn,"你的用戶名","密碼");
    Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENS99vIVE,ResultSet.CONCUR_UPDATABLE);
    Statement stmtcount=conn.createStatement(ResultSet.TYPE_SCROLL_SENS99vIVE,ResultSet.CONCUR_UPDATABLE);

    ResultSet rs=stmt.executeQuery("select * from mytable_view");
    String sqlcount="select count(*) from mytable_view";
    ResultSet rscount=stmtcount.executeQuery(sqlcount);

    int pageSize=你的每頁顯示紀錄數;
    int rowCount=0; //總的記錄數
    while (rscount
    int pageCount; //總的頁數
    int currPage; //當前頁數

    1


    String strPage;
    strPage=request.getParameter("page");
    if (strPage==null){
    currPage=1;
    }
    else{
    currPage=Integer.parseInt(strPage);
    if (currPage<1) currPage=1;
    }
    pageCount=(rowCount+pageSize-1)/pageSize;
    if (currPage>pageCount) currPage=pageCount;

    int thepage=(currPage-1)*pageSize;
    int n=0;
    rs.absolute(thepage+1);
    while (n<(pageSize)&&!rs
    %>
    <%rs.close();
    rscount.close();
    stmt.close();
    stmtcount.close();
    conn.close();
    %>

    //下面是 第幾頁等
    <form name="sinfo" method="post" action="sbinfo_index.jsp?condition=<%=condition%>&type=<%=type%>" onSubmit="return testform(this)">
    第<%=currPage%>頁 共<%=pageCount%>頁 共<%=rowCount%>條
    <%if(currPage>1){%><a href="sbinfo_index.jsp?condition=<%=condition%>&type=<%=type%>">首頁</a><%}%>
    <%if(currPage>1){%><a href="sbinfo_index.jsp?page=<%=currPage-1%>&condition=<%=condition%>&type=<%=type%>">上一頁</a><%}%>
    <%if(currPage<pageCount){%><a href="sbinfo_index.jsp?page=<%=currPage+1%>&condition=<%=condition%>&type=<%=type%>">下一頁</a><%}%>
    <%if(pageCount>1){%><a href="sbinfo_index.jsp?page=<%=pageCount%>&condition=<%=condition%>&type=<%=type%>">尾頁</a><%}%>
    跳到<input type="text" name="page" size="4" style="font-size:9px">頁
    <input type="submit" name="submit" size="4" value="GO" style="font-size:9px">
    </form>

    posted on 2006-10-18 13:37 acerbic coffee 閱讀(299) 評論(0)  編輯  收藏 所屬分類: 個人記錄
    主站蜘蛛池模板: 亚洲国产精品成人综合久久久| 免费一级成人毛片| 亚洲国产另类久久久精品黑人 | 久久久久久亚洲精品| jizz免费在线观看| 免费人成视频x8x8入口| 亚洲精品色播一区二区| 永久免费无码网站在线观看| 中日韩亚洲人成无码网站| 亚洲精品动漫免费二区| 亚洲精品成人网站在线播放| 18禁美女黄网站色大片免费观看 | 亚洲AV无码乱码国产麻豆| 一区二区视频在线免费观看| 亚洲Av无码乱码在线znlu| 免费精品久久久久久中文字幕| 亚洲国产成人久久综合区| 亚洲免费无码在线| 亚洲国产a∨无码中文777 | 久久永久免费人妻精品| 亚洲日本一区二区三区| 最近免费中文字幕大全免费| 亚洲香蕉久久一区二区三区四区| 成年男女免费视频网站| 国产精品无码亚洲精品2021 | a级毛片无码免费真人| 亚洲欧美第一成人网站7777| 日本人的色道www免费一区| 青青青视频免费观看| 亚洲AV人无码综合在线观看| 永久免费视频网站在线观看| 亚洲综合色一区二区三区| 免费少妇a级毛片人成网| 国产一级黄片儿免费看| 亚洲日本国产精华液| 国产精品无码素人福利免费| 国产一级在线免费观看| 亚洲欧洲日本天天堂在线观看| 日韩免费高清一级毛片在线| A国产一区二区免费入口| 久久精品国产亚洲AV无码娇色|