Pagination Problem
Posted: Tue May 16, 2006 3:27 am
I am a little bit stumped on this one. I am creating pages that allow a visitor to view search results with 2 different views.
The first view, say Detailed view shows 16 results per page. The second view, Standard view, shows 36 results per page.
When I calculate what record to start on I use the following code.
The problem I am having is that if you are on page 10, and you change views, the page numbers get out of sync with the results.
How can I maintain page sync regardless of the selected view?
The first view, say Detailed view shows 16 results per page. The second view, Standard view, shows 36 results per page.
When I calculate what record to start on I use the following code.
Code: Select all
$NumberOfResults = mysql_num_rows($Execute);
$StartingRecord = ($NumberOfRecordsDisplayedPerPage * $CurrentPage) - $NumberOfRecordsDisplayedPerPage;How can I maintain page sync regardless of the selected view?