can i get row in table which i want ..
like 1st row / 5th row...
The standard MySQL documentation on the LIMIT option of the SELECT command supplies the answer to that:
Originally posted by MySQL documentation
The LIMIT clause can be used to constrain the number of rows returned by the SELECT statement. LIMIT takes one or two numeric arguments, which must both be non-negative integer constants (except when using prepared statements).
With two arguments, the first argument specifies the offset of the first row to return, and the second specifies the maximum number of rows to return. The offset of the initial row is 0 (not 1): e.g.
SELECT * FROM tbl LIMIT 5,10; # Retrieve rows 6-15
SELECT * FROM tbl LIMIT 5,10; # Retrieve rows 6-15
Rows being rows of the resultset, not the table.
You need to be careful because without an ORDER BY you can't guarantee
the same 10 records will be returned every time..
Comment