Home > Database > Mysql Tutorial > 如何用Jsp读取Mysql数据库_MySQL

如何用Jsp读取Mysql数据库_MySQL

WBOY
Release: 2016-06-01 14:09:00
Original
1047 people have browsed it

  //page是用户提交的参数,用于控制分页的,允许的值是正整数,负整数
int i=count/15; //总页,每页显示15条记录
int j=i/10; //总的大页 ,没10个页面分一大页
//Page 显示的页面
int StartPage;
//int HrefPage;
if (PageStartPage=Page/10; //10页分一次
out.print ("[共有"+i+"页]");
//out.print ("共有"+j+"屏");
//out.print ("显示第"+Page+"页");
//out.print ("StartPage="+StartPage);
if (StartPage>0)
out.print ("|前10页");
for (int k=0;k{ int p=StartPage*10+k;
if (p>i) break;
if (p==Page)
out.print ("|第"+Integer.toString(p+1)+"页");
else
out.print ("|第"+Integer.toString(p+1)+"页");
}
if (StartPageout.print ("|后10页");
out.print ("|");
%>

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template