tags:

views:

24

answers:

3

Hi,

I'm currently looking to have a mysql query retrieve data and have and a start and limit.

So like, select * from table where x = x START AT ID X LIMIT X

thanks :)

+2  A: 
SELECT * FROM table
WHERE x = x
ORDER BY ID
LIMIT x, x
Marcus Adams
+1  A: 
SELECT * FROM `tableName` WHERE `colName`='someVal' LIMIT 0, 10 

The first limit value is the starting record number. The second value is the number of records to query.

Babiker
+2  A: 

You're looking for LIMIT:

SELECT * FROM tbl LIMIT 5,10;  # Retrieve rows 6-15
deceze