Reprinted from Http://www.cnblogs.com/ygj0930/p/6134851.html
In the development process, often do one thing, but also the most basic thing is to query data from the database, and then displayed on the client. When the data is young, it can be displayed within a page. However, if the query record is hundreds of, thousands. Direct a page to show exactly how long the form is. At this point, we can use paging technology.
What is
Paging is a common feature of Java Web Projects, and a simple paging operation and a search page in spring MVC were recorded yesterday. The frame used is (mybatis+springmvc+spring).
First we need a paging tool class: 1. Paging
Import java.io.Serializable; /** * Paging * */
Java technology accumulation-use the original code to witness the paging query implementation principle, java Paging
You are familiar with paging query. The datagrid encapsulated in easyui fully applies a series of table operations. Paging query is one of them. However, we are not familiar with the basic implementation
MySQL paging query optimization solution for millions of data and mysql paging Solution
When there are tens of thousands of records in the table to be queried from the database, all the results of one-time query will become very slow, especially with the increase of data volume, you need to use paging query. There are also many methods and optimization points for
Label:MySQL paging uses limit directly to operate, limit if we directly without any processing may be large data will be very card. one of the most common MySQL most basic paging methods: Select * from content ORDER BY id desc limit 0, In the case of small amounts of data, such SQL is sufficient, and the only problem to be aware of is to ensure that the index is used. As the amount of data increases, th
First, MySQL database paging queryMySQL database implementation paging is relatively simple, providing the limit function. It is generally only necessary to write directly to the SQL statement immediately after the line.The limit clause can be used to limit the number of data returned by the SELECT statement, which has one or two parameters, if two arguments are given, the first parameter specifies the posi
Phpcms V9 custom paging function, phpcmsv9 custom Paging
When you create a website, you may need to control the paging style according to the template requirements. At this time, many people will modify the global File phpcms \ libs \ functions \ global. func. the pages () function in php has the following problem: this pagin
Php text data paging (message book paging ). Many pages are introduced in mysq, but few pages are introduced in the text data table format, here, I will briefly introduce the following paging ideas: 1. paging in the message book 2. there are many paging articles in mysq, but
This article mainly introduces thinkphp paging class, which is similar to dedecms drop-down paging style modification. For more information, see
This article mainly introduces thinkphp paging class, which is similar to dedecms drop-down paging style modification. For more information, see
This example describes
The paging Stored Procedure of yesterday (ii) used the cursor in the paging results returned by MSSQLServer with more accuracy. Many enthusiastic Friends participated in the discussion. Thank you for your participation.
The paging stored procedure yesterday (ii) used a cursor in the paging results returned by ms SQL Se
ASP. net mvc paging implementation, asp. netmvc Paging
ASP.. net mvc does not support paging controls. Therefore, I wrote a partial page view by myself. In combination with the PageInfo class, pages can be displayed anywhere on any page, because the POST-based paging method is used, the only restriction is that it must
/*
* PHP Paging Query code
*
*/
$perpagenum = 10;//definition shows several pages per page
$total = Mysql_fetch_array (mysql_query ("SELECT count (*) from a"));//Query the database for the total number of data
$Total = $total [0]; //
$Totalpage = Ceil ($Total/$perpagenum);//upper loft, rounding
if (!isset ($_get[' page ') | |! Intval ($_get[' page ') | | $_get[' page ']> $Totalpage)//page possible four states
Yii framework paging implementation method details, yii framework paging details
This article describes how to implement the Yii framework paging. We will share this with you for your reference. The details are as follows:
The framework used by the next company is yii. After reading the relevant tutorials over the past few days, I wrote the
One, the most common MySQL most basic way to paging:
The code is as follows
Copy Code
SELECT * from content ORDER BY id desc limit 0, 10
In the case of small and medium data, such SQL is sufficient, the only problem to be aware of is to ensure that the index is used. As the amount of data increases, the number of pages becomes more numerous, and the next few pages of SQL may look similar:
The code is
Efficient paging method code (SQL millions data paging code)
@querystr nvarchar,--table name, view name, query statement@pagesize int=10,--the size (number of rows) per page@pagecurrent int=1,--the page to display@fdshow nvarchar = ',--the list of fields to display, if the query results are marked with a literacy section, you need to refer to
This value, and does not contain an identity field@fdorder nvar
I used to paging in MySQL used to limit 100000,20 such a way, I believe you are, but to improve efficiency, so that the paging code more efficient, faster, then how do we do?
Part One: Look at the basics of pagination:
Copy Code code as follows:
MySQL explain SELECT * from message ORDER by ID DESC LIMIT 10000, 20
1. Row **************
Id:1
Select_type:simple
Table:message
Type:in
1. Installation
2.In the NuGet package management console, enter Install-package PAGEDLIST.MVC installation pagedlist and PAGELIST.MVC;
3.
@{Layout = null;} @model pagedlist.ipagedlist
4. Control inside is quoted = "Using Pagedlist;"
5.
Each page @Model. pagesize.tostring () records, a total of @Model. Totalitemcount.tostring () records. viewbag.totalrecords = 0 0:model.pagenumber) page, a total of @Model. PageCount page. Or
Each page @Model. PageSize Records, a total of @Model. Totalitem
The following small series will bring you an article on PHP paging a simple implementation of the simplest PHP paging code. I think this is quite good. now I will share it with you and give you a reference. Let's take a look at the PHP paging code that must be used in various program development processes. it is also required in website development.
To write
JQuery-based paging instances for non-refreshing tables and jquery table paging instances
This example describes the implementation of jQuery-based Brushless new table paging. We will share this with you for your reference. The details are as follows:
As follows:
Html structure:
Css style:
Html, body {margin: 0; padding: 0} a: focus {outline: none;}/* common ta
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.