Phoenix Tips (10) 分页查询

组合使用order  by,   > ,   LIMIT   :

 

SELECT title, author, isbn, description 
FROM library 
WHERE published_date > 2010
AND (title, author, isbn) > (?, ?, ?)
ORDER BY title, author, isbn
LIMIT 20

 

posted @ 2014-11-09 13:37  lihui1625  阅读(100)  评论(0编辑  收藏  举报