[PHP] general pagination question

Sic

Sic

Soldato
Joined
9 Nov 2004
Posts
15,365
Location
SO16
i'm working on a gallery (when am i not?!) and i've just discovered arrays and how great they are. the index table is created when 9 results are loaded into an array and put in 3 unordered lists, from a mysql database.

when you're viewing a single image, i want to be able to skip to the next and previous images. is it going to be a bit overkill to load the ids of each image in my gallery table into an array, and pick the results in the array that are adjacent to the current view, or would that be acceptible? obviously, this gallery isn't going to get that big, but i'd like to code on the assumption that it could be one day...in other words, i don't want it to be too bloated?

is there a better way to do what i'm after?
 
Back
Top Bottom