tags:

views:

29

answers:

2

I am looking to return the 2nd, or 3rd, or 4th record from a MySQL query (based on a query by ID ascending)

The problem being, I won't know the ID, only that it is the 3rd row in the query.

+1  A: 

SELECT * FROM table ORDER BY ID LIMIT n,1 should work. It says return one record starting at record n.

cmptrgeekken
Appears to have done the trick! Many thanks
paulrandall
+1  A: 

Use the limit clause (add 'limit 3, 1' to the end of your query to only select the third row).

Here's some more information: http://php.about.com/od/mysqlcommands/g/Limit_sql.htm

Mike Cialowicz