X is the starting point (remember the first record is 0) and Y is the duration (how many records to display).
Table 'example' have following data.
SELECT * FROM `example` ORDER BY `example`.`age` ASC LIMIT 0 , 30
id name age
3 Amit 26
5 pani 27
2 Sanjay 28
4 Lucky 29
6 atul 30
1 Kumar 31
SELECT * FROM `example` ORDER BY `example`.`age` ASC LIMIT 3 , 1
id name age
4 Lucky 29
remember the first record is 0
)
1 comment:
cool. Nice and simple. Like it.
Post a Comment