0
Assuming I have 10 records and per page shows 3, then the ID 2 will be on the page 1, the ID 7 on the page 3, and so on. In practice I need to access www.dominio.com/lista.php?id=7
page 3, referring to the position of the ID 7.
It is possible to do this in a single query, without having to make a previous query to calculate the position?
No hole in your Ids? Never will?
– bfavaretto
@bfavaretto, the most that can occur is
status = false
to omit a record. The ID will always be there, I just don’t know if the clausestatus = false
affects what you have in mind.– Papa Charlie
If it needs to be omitted from the list when it has such status, yes.
– bfavaretto
I will have to calculate the ID position before paging to play the
limit X, Y
? I’ll test a subquery.– Papa Charlie
I was thinking of calculating even earlier (a module would solve, considering a list ordered by ID and without holes). But honestly I can’t imagine why you want to do this...
– bfavaretto
@bfavaretto, is a 'jumper' in a comment system where you can jump to a particular comment without having to separate from the others, and continue browsing. Otherwise I need to separate the comment and reshape the display
– Papa Charlie