kymbrik
1/18/2018 - 3:56 PM

Select last N rows from MySQL

SELECT * FROM (
    SELECT * FROM table ORDER BY id DESC LIMIT 50
) sub
ORDER BY id ASC