Reputation: 368
I'm trying to select from mysql like this: select 3 entries, skip the next 2 and so on. Is this possible with mod,id
? Or what would be the best possible way to do it ?
(I don't delete any entries ever, so the order won't be a concern)
//Edit: Thinking of something like select * from table where id mod 4 <> 0
which would skip the 4th, any way to also make it skip the 5th ?
Upvotes: 1
Views: 80
Reputation: 808
I suggest you to add one more column, and update it on insert (1,2,3...), and then use WHERE clause.
Make things more simple.
And don't forget to add index on this column
Upvotes: 3