Select last rows from MySQL table.
Posted: Sat Feb 25, 2012 7:08 am
How to select the last rows having a primary key that is auto incremented, how to select only the last x amount of records that were inserted into the table for example.
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
SELECT foo FROM table_name ORDER BY id DESC LIMIT 10