This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- mysql单条SQL查询出分页和总数 | |
SELECT SQL_CALC_FOUND_ROWS t.* FROM ( SELECT 1 AS allCount, | |
dr.id AS reportId | |
FROM dr_daily dr | |
WHERE 1=1 | |
GROUP BY dr.id | |
ORDER BY dr.create_time DESC | |
)t | |
LIMIT 1,2 |