Is it somehow possible to retrieve the position of a certain row in the results of a mysql query?
To be more expecific, I have a table containing products.
Now, this products belong to different product groups. The products are qualified by groups in a another table where I
use the product ID and the group ID.
When I print some product I want to have navigation links
which will show the next or last product that belongs to the same group. Eg: if I print the product number 5, the "next" link will print the product number 8 and the "last" will print the product number 3. To achieve this I need to work with ID numbers. But how would be possible to get the last product and next product ID when they are not consecutive numbers? Im working with PHP.