Home >Database >Mysql Tutorial >分页的另一种方式_MySQL

分页的另一种方式_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-01 13:37:41981browse

bitsCN.com


分页的另一种方式

 

分页的另一种方式

代码      

SELECT SQL_CALC_FOUND_ROWS id,name limit 1,10;  

  

SELECT FOUND_ROWS();  

  

SELECT id, title, content FROM article  

INNER JOIN (  

    SELECT id FROM article ORDER BY created DESC LIMIT 10000, 10  

) AS page USING(id)  

 

bitsCN.com
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn