ÉèΪÊ×Ò³ ¼ÓÈëÊÕ²Ø

TOP

ÔÚORACLE ´óÊý¾ÝÁ¿ÏµķÖÒ³½â¾ö·½·¨¡£Ò»°ãÓýØÈ¡ID ·½·¨£¬»¹ÓÐÊÇÈý²ã ǶÌ×·½·¨
2014-11-24 01:04:19 ¡¾´ó ÖРС¡¿ ä¯ÀÀ:900´Î
Tags£ºORACLE Êý¾Ý ½â¾ö ·½·¨ Ò»°ã ½ØÈ¡ »¹ÓÐ

´ð:Ò»ÖÖ·ÖÒ³·½·¨
<%
int i=1;
int numPages=14;
String pages = request.getParameter(¡°page¡±) ;
int currentPage = 1;
currentPage = (pages==null) (1):{Integer.parseInt(pages)}
sql = ¡°select count(*) from tables¡±;
ResultSet rs = DBLink.executeQuery(sql) ;
µÚ36 Ò³¹²59 Ò³
while(rs.next()) i = rs.getInt(1) ;
int intPageCount=1;
intPageCount=(i%numPages==0) (i/numPages):(i/numPages+1);
int nextPage ;
int upPage;
nextPage = currentPage+1;
if (nextPage>=intPageCount) nextPage=intPageCount;
upPage = currentPage-1;
if (upPage<=1) upPage=1;
rs.close();
sql=¡±select * from tables¡±;
rs=DBLink.executeQuery(sql);
i=0;
while((i %>
//Êä³öÄÚÈÝ
//Êä³ö·­Ò³Á¬½Ó
ºÏ¼Æ:<%=currentPage%>/<%=intPageCount%>Ò³
µÚÒ»Ò³
¡±>ÉÏÒ»Ò³
<%
for(int j=1;j<=intPageCount;j++){
if(currentPage!=j){
%>
¡±>[<%=j%>]
<%
}else{
out.println(j);
}
}
%>
¡±>ÏÂÒ»Ò³
¡±>×îºóÒ³


¡¾´ó ÖРС¡¿¡¾´òÓ¡¡¿ ¡¾·±Ìå¡¿¡¾Í¶¸å¡¿¡¾Êղء¿ ¡¾ÍƼö¡¿¡¾¾Ù±¨¡¿¡¾ÆÀÂÛ¡¿ ¡¾¹Ø±Õ¡¿ ¡¾·µ»Ø¶¥²¿¡¿
ÉÏһƪ£º´¥·¢Æ÷·ÖΪÊÂÇ°´¥·¢ºÍʺ󴥷¢£¬.. ÏÂһƪ£º¾ÃÆäÃæÊÔÌ⣨Ñз¢Àࣩ

×îÐÂÎÄÕÂ

ÈÈÃÅÎÄÕÂ

Hot ÎÄÕÂ

Python

C ÓïÑÔ

C++»ù´¡

´óÊý¾Ý»ù´¡

linux±à³Ì»ù´¡

C/C++ÃæÊÔÌâÄ¿