treez Posted March 25, 2006 Share Posted March 25, 2006 I have a build-your-own-website website and one of the add-ons is a gallery.In my gallery table I have the following fields:id, owner, timestamp, filename, thumbname, title, description, category, orderingCurrently it shows the thumbs in a list and the user clicks each thumb and it just opens the fullsize image.I wanna make a page that you can click a thumb, view the image but also click NEXT or PREVIOUS.The only way I know of this is if I use a WHERE id=(id+1) type thing.but these arent always going to be consecitive for that user.How can I make it so it views the NEXT one thats viewed under ORDERING (ordering is sometimes blank too)Main SQL for the initial listing:$query="SELECT * FROM gallery_images WHERE category = '$cat' AND owner = '$usern' ORDER BY ordering DESC LIMIT $offset, $limit"; Quote Link to comment Share on other sites More sharing options...
treez Posted April 28, 2006 Author Share Posted April 28, 2006 Does anyone know how to do this? I just wanna make it so it fetches the next ID in the database. Quote Link to comment Share on other sites More sharing options...
michaellunsford Posted April 28, 2006 Share Posted April 28, 2006 what does the query on the fullsize page look like? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.