I have a MySQL table which stores these fields:
Filename, Description, Rating
I am using the Smarty template engine and need to navigate between individual pages of the data (each page will show one Filename) to show the pages based on a criteria (for example highest rating to lowest rating).
Essentially what I need is something similar to this:
http://phplens.com/adodb/tutorial.im....previous.html
However the problem with this is that the URL contains which position you are through the MySQL result set.
I am using mod_rewrite so that each filename appears as a standard HTML page, and I want the script to know automatically which is "next" so the link refers to the next filename/page specifically, not the position in the data.
So essentially I need to know the current file's position in the total filter (rating) and the file that is before and after it? Does anyone know how I can achieve this?
Thanks!
Dan.