How to read MySQL database with JSP

Source: Internet
Author: User
Tags mysql database

<%//indicates that count is the number of bars for the total record





//page is a user-submitted parameter that controls paging, the allowable values are positive integers, and negative integers





int I=COUNT/15//Total page, 15 records per page





int J=I/10//Total Large page, No 10 pages divided into one big page





//page Display page





int startpage;  





//int hrefpage;  





if (page<0) page=0-page*10//10 page divided once





STARTPAGE=PAGE/10//10 page is divided one time





Out.print ("[A total of" +i+ "page]");  





//out.print ("Common" +j+ "screen");  





//out.print ("show the First" +page+ "page");  





//out.print ("startpage=" +startpage);  





if (startpage>0)





out.print ("| first 10 pages ");  





for (int k=0;k<10;k++)





{int p=startpage*10+k;





if (p>i) break;  





if (p==page)





out.print ("| +integer.tostring" (p+1) + "page");  





Else





out.print ("| +integer.tostring (p+1) + "page ");  











if (startpage


Out.print ("| 10 pages");  





Out.print ("|");  





%&gt;

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.