Answer the question
In order to leave comments, you need to log in
How to find out on which page any of the records is located?
I make a selection from the database - 16 random records. As a result, I have an array with unique records.
And now the question is - how to find out on which page any of the records is located, if during the normal viewing of all records, pagination of 5 records per page?
This is to make a link with an anchor - site.ru/page/10/#id
Answer the question
In order to leave comments, you need to log in
well, apply the pagination algorithm
numOnPage = N
PageNum = 1 + int(TotalNum) / int(numOnPage)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question