Mysql: i need to get the offset of a item in a query.
- by user305270
Mysql: i need to get the offset of a item in a query.
I have a image gallery: this show 6 image per stack, so when i request image 22 it shows images from 18 to 24. It should first get the offset of the image 22, then get the images from 18 to 24.
Another example: i request the image number 62(and offset 62), it will select images with offset from 60 to 66.
Is possible with a single query?
Thanks ;)