MySQL Basics 3

Source: Internet
Author: User

One, customer management system crud
Second, Big Data paging Web page
1. MySQL: Paging statement limit
SELECT * from Customer LIMIT m,n;
M: The index that represents the start record. Starting from 0
N: How many bars to take at a time

Each page shows 10 articles:
First page data: SELECT * from Customer LIMIT 0, 10;
Second page data: SELECT * from Customer LIMIT 10, 10;

Index of starting record per page: (page 1) *10;

Total Pages: Total number of%10==0? Total number of bars/10: Total number of bars/10+1

2, paging code
A. Reform DAO:
A1: Querying Total Record data
A2: Query data by index per page and the number of bars displayed per page

B, Page class
Private List records;//Package data database isolated to
private int pagesize = 10;//show how much per page *
private int totalpage;//Total page Count *
private int startindex;//Index of each page start record *
private int currentpage;//The current page page is coming *
private int totalrecordsnum;//Total record Count database isolated *
C, transformation of the business layer
Page findpagereocords (String pagenum);
Third, batch processing
Four, large text, binary data access
V. Get the database auto-generated primary key
Vi. Calling stored Procedures

Vii. Getting Started with business
1, MySQL database: By default, the transaction is automatically opened. A statement is in a separate transaction.
2, connection and business-related methods
Setautocommit
Setsavepoint
Rollback
Commit

MySQL Basics 3

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.