Reputation:
I have a query that gets a result, limits it and then does a sort around the limited results. Something like:
(SELECT SQL_CALC_FOUND_ROWS * FROM table ... ORDER BY score DESC LIMIT 0,15) ORDER BY name ASC;
Using
SELECT FOUND_ROWS() AS total
after will always return 15 due to the sub sort. Is there a way around this?
Thanks!
Upvotes: 1
Views: 103