Is it possible to skip the first found record from a table?
Cheers
Jim
[SOLVED] Skip a record
Moderator: General Moderators
[SOLVED] Skip a record
Last edited by hairyjim on Fri Oct 01, 2004 10:08 am, edited 1 time in total.
LIMIT
use LIMIT in your query.
will return the first 30 results but miss the first
syntax is LIMIT startAt, how many
Code: Select all
select * from someTable LIMIT 2, 30syntax is LIMIT startAt, how many
Be aware that the first record is record 0, not 1:
So you need to limit 1,30 in the example aboveThe LIMIT clause can be used to constrain the number of rows returned by the SELECT statement. LIMIT takes one or two numeric arguments. The arguments must be integer constants. If two arguments are given, the first specifies the offset of the first row to return, the second specifies the maximum number of rows to return. The offset of the initial row is 0 (not 1):