Pagination, conditional query

1 Pagination query

1.1 Paging core

Design a PageBean object to encapsulate all paging-related data of the current page, and display the current page information according to the PageBean object each time you visit

1.2 Implementation steps of paging

1 ) Write paging object and entity object

2 ) Write DAO layer code (query the total number of records and query the current page data)

3 ) Write Service layer code (encapsulate PageBean object)

4 ) Write servlet code (receive user input)

5 ) Write jsp page code (display paging effect)

 

2 conditional query

2.1 The core of conditional query

Assemble the sql statement string according to the user's query conditions :

 

  Note: Paging query and conditional query are both an application

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325356250&siteId=291194637