Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to do image 15 of 20 type thing

Status
Not open for further replies.

tyutghf

Technical User
Apr 12, 2008
258
GB
On facebook if you click an image it will take you directly to that image in that folder and display prev and next buttons.

I have created two versions of my image pages, one you click an image and it shows a bigger version but without prev and next buttons SQL=select * from images where id = requestquerystring("id") and another using paging but this pulls back all the images starting from the first it finds SQL=select * from images where user = request.querystring("user")

How do I do both so I can pull back all images relating to that user but start at the image selected and not at the start so I can do a facebook type thing and start at image 10 instead of image 1 each time?

Thanks
 
I forgot to say that I am using mysql so I can use the limit function.

can`t figure the logic out at all today.

The image id's won`t be sequential as there are multiple users, so a typical set of images may be

img1.jpg - 10
img2.jpg - 35
img3.jpg - 50

So if someone selects image 10 to view there needs to be next buttons to show 35 and 50 etc.

 
wahey, just got back from the gym and had an idea whilst I was near death on the cross trainer, got back and tried it and it worked!

All I had to do was hook my paging script up to the image output screen, doh!

Thanks if you read this anyway
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top