Right now I have some links to move to a Previous page or to the Next page (or any page number).
ex. <--prev | 0 | 1 | 2 | 3 | next-->
My issues is that I am only listing items on the page with a "status='A'". (A for active... some items are no longer being listed on this page and would have a 'D' for Delete or 'S' for Sold Out).
In the SQL I have ... WHERE status='A' LIMIT $start_item, 20
My issues is with the Previous link. How should I calculate the $start_item for it? Right now I am using the current ID (the first ID on the page currently being displayed) and subtracting 20 from it (the number of items per page). But if there are any items that are not Active between the current ID and ID-20 then the 20 items being displayed when clicking on Prev will run into the current ID.