[PHP-DB] Tricky MySQL / php Script

2004-08-18 Thread Vern
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.jpguserID=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?

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Tricky MySQL / php Script

2004-08-18 Thread Vern
That's not what I mean at all. I actually have no idea where you got that
from. :)

Basically what I'm trying to say is this. The following is my url:

mypage.php?photoID=uploads/1052367746.jpguserID=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?

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Tricky MySQL / php Script

2004-08-18 Thread Vern
Sorry but that doesn't make and sense either. I have no problems passing the
variables along. Why are you trying to tag that to the image?

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] SQL for Showing the number of queries served on each day.

2004-04-30 Thread Vern
I found this code below that allows me to retreive the queries served on my
server for each day but can't figure out how to actually display the
information using echo. Can some one give me an example using the following
SQL?

SELECT DATE_FORMAT(ex_date, '%Y %m %d %W'), COUNT(id)
FROM email
WHERE ex_dateNow()-INTERVAL 50 DAY
GROUP BY DATE_FORMAT(ex_date, '%Y %m %d %W')
ORDER BY DATE_FORMAT(ex_date, '%Y %m %d %W') DESC

Thanks

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] SQL for Showing the number of queries served on each day.

2004-04-30 Thread Vern
That did it thanks

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php