Re: Tricky MySQL / php Script
| From: | Jason Wong | Date: | Thu, 19 Aug 2004 04:39:22 +0000 |
| Subject: | Re: Tricky MySQL / php Script | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-35799@lists.php.net to get a copy of this message | ||
On Thursday 19 August 2004 09:23, Vern wrote:
> Basically what I'm trying to say is this. The following is my url:
>
> mypage.php?photoID=uploads/1052367746.jpg&userID=215
>
> photoID = uploads/1052367746.jpg
> userID = 215
>
> I want to point to a record in a recordset.
> That records id is "uploads/1052367746.jpg"
> However, I want to return all records for the userID "215".
>
> How do I point my recordset at that file in the recordset so that the user
> can go to the next and previous records in that recordset based on the
> user's id?
Assuming you have already created your 'recordset':
loop through recordset looking for 'photoID'
when found, use mysql_data_seek() to grab the previous and next records
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
------------------------------------------
/*
"No problem is so formidable that you can't walk away from it."
-- C. Schulz
*/