hi - I'm working with a mySQL database and php to create a web site which includes, among other things, slide shows of photographs. the question is, how can I retrieve the ids of the next/back photos associated with the current photo?
if I was ordering the photos by id, the answer would be obvious - but I want to be able to specify an arbitrary order of photos, because otherwise trying to insert a new photo in the middle of the slideshow would necessitate updating the id of every other photo with an id greater than the entry point in order to make room.
I'm a little new to mySQL - what's the best way of specifying this order in a manner flexible enough for updating?
thanks for your help -
if I was ordering the photos by id, the answer would be obvious - but I want to be able to specify an arbitrary order of photos, because otherwise trying to insert a new photo in the middle of the slideshow would necessitate updating the id of every other photo with an id greater than the entry point in order to make room.
I'm a little new to mySQL - what's the best way of specifying this order in a manner flexible enough for updating?
thanks for your help -