Jump to content

gallery help


treez

Recommended Posts

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, ordering


Currently 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";
Link to comment
Share on other sites

  • 1 month later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.