如何在不使用分页的情况下返回相同的MySql记录

I have a MySql table with over 1000 products that I scroll through, I understand the SQL query below says "return only 10 records, start on record 16 and display the next 10 records"

sql =”SELECT * FROM items LIMIT 10 OFFSET 15”;

I could keep track of LIMIT and OFFSET within variables and use a pagination function to scroll through my table.

BUT I don’t want to use pagination. I just want to scroll up or down through all my records up or down, even if there where more than 1000 records, I don't care. So here is the problem, lets say product record 567 is displayed on page(A) and I have a link to another page(B) that displays more product information. Then I want to come back to page(A) to same spot, record 567 and be able to scroll up or down through my records. Even the records less than 567. This is why OFFSET is not necessarily what I need. Any Ideas would be great.

If you just use the back button of the browser it's up to the browser to memorize the position and hopefully restore it. If you go back via link an page B use anchor links in page A and have the link in page B point at that. You have to pass the right link from page A to page B of course.

E.g.:

Page A:

...
<a href="#4711">Product 4711</a>
<a href="page_b.php?id=4711">View details</a>
...

Page B:

...
<h1>Product 4711</h1>
(Description of product 4711)
<a href="page_a.php#4711">Go back to the list of products</a>
...