I’m creating a pagination with a where clause.
I need to know the true behaviour of the offset.
- Is the offset calculated based on all the rows that match the where clause? Or
- The offset is calculated like an id and all rows are considered. Eg. If you specify an offset of 5, rows will be returned starting from the 6th row in the table even of the first 4 rows don’t match the where clause?
Edit: I want to be sure since the second behaviour would be totally incorrect and cause problems.
Thanks for your answers. I can’t comment as my browser fails at javascript and ajax horribly.
Yes the offset is calculated based on all rows that matches the where clause. Just try it.