ASP Classic & Mysql - Find out which page the X record is on

Asked

Viewed 53 times

0

I have a problem that I think is more logical than language itself, but if you can answer in ASP Classic already helps enough.

I need to create a function, where given an X record, and a number of records per page, indicate on which page the record appears.

Example of resultset:

Página 1  |  Página 2  | Página 3 |
id: 155   |  Id: 863   | Id: 1024 |
Id: 154   |  Id: 864   | Id: 1023 |

The idea is to create a function in which I passed to it the query parameters, and the necessary id, and it returned me on which page the ID would appear.

In this case, if I passed the id: 863, it would return me to page 02. If it were 154, page 1 and so on.

Thank you in advance for your attention.

  • But where are the references page x id? They skip number or not?

  • What would be these parameters?

  • Present your query and the script you are using for paging

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.