Re: Tricky MySQL / php Script
| From: | Peter Ellis | Date: | Thu, 19 Aug 2004 01:12:38 +0000 |
| Subject: | Re: Tricky MySQL / php Script | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-35793@lists.php.net to get a copy of this message | ||
I assume you mean the 1052367746 portion of that URL? Am I right? If
so:
$id = basename($photoid, ".jpg");
That would work, I think, if you just wanted the numeric portion of the
path. Not sure if this is what you want.
--
Peter Ellis - pellis@naturalaxis.com
Web Design and Development Consultant
naturalaxis | http://www.naturalaxis.com/
On Wed, 2004-08-18 at 19:55 -0400, Vern wrote:
> 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?