In my current method, I use order by date in sql query, then set the back results as a new array, sort array by id via php.
SELECT * FROM table
WHERE
(
MATCH (title,content)
AGAINST ('+$search' IN BOOLEAN MODE)
)
order by date DESC
limit 0,10
I wanna to ask, Is there a sql method, first order by date get 10 result back then in these 10 results, order by id again, just in one sql query?
Wrap an outer query around your current query.