Use the LIMIT keyword (Similar to TOP in MSSQL) If you use ORDER BY to order the results descending, so that the latest records will be at the top of the result set. Then use LIMIT to get just the first three of those records.
SELECT someColumn
FROM someTable
ORDER BY someColumn DESC
LIMIT 3
Last edited by hollystyles; Jan 15th, 2008 at 4:46 am.
Reputation Points: 262
Solved Threads: 68
Veteran Poster
Offline 1,181 posts
since Feb 2005