Tricky MySQL / php Script
| From: | Vern | Date: | Wed, 18 Aug 2004 23:55:57 +0000 |
| Subject: | Tricky MySQL / php Script | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-35792@lists.php.net to get a copy of this message | ||
I have a bunch of thumbnails that are pulled from a recordset based on a
user profile.
Each thumbnail opens the picture into another page so that the picture is
larger and I want to now have that user's pictures accessible by clicking a
previous and/or next arrow.
The first recordset of thumbnails is retrieved by a URL link
($HTTP_GET_VARS['id']) which is the user's ID number.
Click on one of the thumbnails a new page is open that display the larger
photo, but only that photo. I can of course pass along the user's ID as well
mypage.php?photoID=uploads/1052367746.jpg&userID=215
which of course will allow me to create a new recordset based on the user's
id
SELECT *
FROM penpals_photos
WHERE penpals_photos.filename = $photoID
but how do I point the database first record at the photoID so that I can
use the next and previous options to see the next/previous picture?