This paper describes the implementation of the PHP background table paging function. Share to everyone for your reference, as follows:
user.php:
delete.php:
Note:
(1) Using AJAX can realize the value optimization, improve performance, there is no implementation;
(2) Next page There are not some bugs, not to the last page to stop, follow-up to achieve it.
The SQL table structure is as follows:
SQL paging statement:
Select top 5 *, (select count (*) inum from (select distinct areaid, areatypeid, lifeyear, [State], relatedid from monitorbaseenterinfo where 1 = 1) I) as countnum from (select row_number () over (order by lifeyear DESC) as rownumber, * from (select distinct areaid, areatypeid, lifeyear, [State], relatedid from monitorbaseenterinfo wh
if exists (select 1 from sysobjects where name = ' proc_pagination ') drop proc proc_pagination go create proc Proc_paginatio N--Creates a paging stored procedure @page int = 1,--the number of pages @pagesize int = 10, the size of each page @tableName varchar (100), the table name to query @orderFields varchar (255 --The sorted field name (to be sure) @GetFields varchar (1000) = ' * ',--the column to be ret
Reason: jquery is simple, compatibility is good and easy to encapsulate. Do not say much nonsense, immediately start our jquery plugin write it. There should be a lot of people who have written similar plug-ins, and I also have some form of imitating FlexGrid.
Requirements: GridView display data, no refresh paging, no refresh sort, no refresh filter (search data
HTML pages need to be printed in recent projects. You need to specify the area for printing and use the jquery. PrintArea. js plug-in.Usage:Javascript code
$ ("Div # printmain"). printArea ();
However, the content behind the DIV will still be printed. here we can use CSS to control the page printing.Css code
Sometimes CSS is used to control paging, but pages are printed continuously. Here, the proper
Because of the project, I used jquery easyui to feel that the interface was good and there were few skin styles, but the official website could not be opened recently, and there was less information, so the demo didn't have the desired effect, today, when I used the DataGrid for paging display, I had to spend a long time and had less information on the Internet. After that, I started to solve the problem by
Js table paging implementation code. For more information, see.
The Code is as follows:
Original region Management ScriptFunction Page (iAbsolute, sTableId, sTBodyId, page){This. absolute = iAbsolute; // maximum number of records per pageThis. tableId = sTableId;This. tBodyId = sTBodyId;This. rowCount = 0; // number of recordsThis. pageCount = 0; // Number of pagesThis. pageIndex =
automatically replaced with the corresponding dataEmptymsg: "No Records"//display information when no data is present }) }); //Loading DataStore.load ({params:{start:0,limit:25}});}); I found a problem here, although I set the pagesize at the front desk to 10 or other values, but the final result is always the first page to show you set the number of bars, the second page is a problem, for the moment do not know what the reason. know the trouble to tell me next.ExtJS4.2 Learning (vi)
Ask SQL statements, multi-table query one-to-many paging
Three sheets
Title Table topic, field to_id to_title
Knowledge Point table tag, field t_id T_title
Association table relation, field to_id t_id
Each topic can have multiple knowledge points
Now the Web inte
The table-stored SDK provides a batchgetrow, Batchwriterow, GetRange, and Createrangeiterator interface for multiple-line operations, paging and reverse lookup, and filter condition queries. Batch read (Batchgetrow)
The batch read interface can request to read multiple rows of data at one time, and the parameters are consistent with the GetRow interface parameters. It should be noted that all rows read with
Prerequisite: Custom Search with paging functionality, such as the ability to search for product names.
Phenomenon: When searching for inflatable dolls, return 100 records and turn to page fifth. This time the search massage stick, the data has 200, the result should be the first page of the record, but the actual display is the result of page fifth. That is, after the search, PageNumber has not changed.
According to most of the online: RESET option
Remember the current page when you modify the delete operation;3: The query after the page can remember the current query conditions
3.2 implementationHtml
Copy code code as follows:
JqueryFor our control to be free to use, we will write it as a plug-in form, first of all, we have a framework, we named the plug-in SimplePageCopy code code as follows:(function ($) {$.fn.simplepage=function (o) {var options={Configuration parameters};Return//sth}}) (jquery
This article describes the jquery implementation of the animation page with the shuffle effect. Share to everyone for your reference. Specifically as follows:
This jquery pagination sample is loaded with an Li list of pictures, which is divided into multiple pages using jquery technology, and animation effects are added to the
the number of displays per page$page = 1; The first default is page 1thif (!empty ($_get[' page ')) {$page = $_get[' page '];}$start = ($page-1) * $pageSize; Start line number $sql = "SELECT * from Show_register ORDER BY id desc limit $start, $pageSize ; "; $result =mysql_query ($sql); if ($result ===false) { echo "Failed to get data"; }else{ $fileName = $_ server[' Script_name ']; 5.1 6.2 Gets the current relative path/folder/file name. PHP form $numCount =mysql_num_fields ($re
1 Public functionGet_search ($page=1){2 $slide=$_post[' Slide '];3 $page=Trim($page);4 $arr=$this->m->get_all ("Select a.* from ' Lx_z_news ' as a where a. ' title ' like '% ').$slide." % ' UNION ALL SELECT b.* from ' lx_z_product ' as B where B. ' title ' Like '% '.$slide." %‘ ");5 $row=Count($arr);6 $page 2=page ($page,$row, 10);7 $select _from=$page 2[' Select_from '];8 $select _limit=$page 2[' Select_limit '];9 $arr 1=$this->m->get_all ("Select ' A ' tbname,a.title,a
Reason: jquery is simple, compatible, and easily encapsulated. Let's talk a little bit about it. Let's start writing the Jquery plug-in now. There should be many people who have written similar plug-ins, and I also have some forms that mimic flexGrid.Requirement: display data in the GridView, no refreshing paging, no refreshing sorting, no refreshing filtering (s
obtaining different page numbers. When the page layout is good, leave the data area div. Request the. ashx program on the page to generate the html code for the next page. Overwrite div. innerHTMl.The first is the page, because it is necessary to practice ideas, so the page is really very simple. References jquery. jsCopy codeThe Code is as follows:
Then write the. js file to implement paging control on t
Query code$ (funtion () {Set even lines and odd lines$ ("tbody>tr:odd"). AddClass ("ou"); Set style for odd rows (add Style Class)$ ("Tbody>tr:even"). AddClass ("Dan"); Set style classes for even rows$ ("Tbody>tr:has (: Checked)"). AddClass ("Ed"); Determines whether the row is selected (returns a Boolean type) to add a style class//has (: checked)) to return a bool value True/falseSearch is selected has (: checked)$ (' tbody>tr '). Click (function () {var hased = $ (this). Hasclass (' Ed ');if
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.