Calculate the page that an ID is located

0
Assuming I have 10 records and per page shows 3, then ID 2 will be on the 1 page, the ID 7 on the page 3 , and so on. In practice I need to access www.dominio.com/lista.php?id=7 and pagination skips to page 3, referring to the position of ID 7 .

Is it possible to do this in a single query, without having to do a previous query to calculate the position?

    
asked by anonymous 28.02.2015 / 00:40

0 answers