how can I edit this code so that it selects the $name with the second lowest ‘id’ value:
SELECT * FROM users WHERE name='$name' ORDER BY id ASC LIMIT 1
I thought it might be something like:
SELECT * FROM users WHERE name='$name' ORDER BY id ASC + 1 LIMIT 1
but that wasn’t right. Any Ideas? Thanks.
Specify an offset like so:
or like so:
In the latter case, the first number is the offset, and the second is the number of elemenets returned.
See also: