Mysql>SelectSql_calc_found_rowsID, rankname,control,action from Xin_rank whereID< -Limit0,Ten;Selectfound_rows (); +----+-----------------+---------+--------+|ID| Rankname | Control | Action |+----+-----------------+---------+--------+|1| Account Management | admin | Manage | |2| Administrator Management | admin | L | |3| Admin Save | admin | Save | |4| Admin Edit | admin | Edit | |5| Admin Add | admin | Add | |6| Admin Delete | admin | del | |7| Admin View | admin | View | |8| Role Management | Role | L | |9| Role Saving | Role | Save | |Ten| Role Editing | Role | Edit |+----+-----------------+---------+--------+TenRowsinchSet (0.00sec)+--------------+| Found_rows () |+--------------+| the|+--------------+1RowinchSet (0.00Sec
The general paging is made up of two SQL statements, one is the record of the current page that matches the criteria, and one is the total number of records that are eligible for the query.
But there is only one SQL statement above, you can implement paging + query. Niubi
Reference Documentation:
http://blog.csdn.net/onisland/article/details/5729549
http://blog.csdn.net/qq_17271573/article/details/48312195
MySQL Alternative paging method