on 9/6/01 11:52 PM, [EMAIL PROTECTED] went and wrote:

> I'll show you what I did but realize I'm an advanced beginner/intermediate
> programmer. This may not be the most efficient way to do it but seems to
> be the simplest code compared to other ways of doing it that I've seen. Not
> sure if I will explain this well enough either. And this is for a fairly small
> database. With a larger one it may be too inefficient.
> 
> First count how many records are in the database for the album and put
> it in $count.
> 
> Then loop through all the records in the album, place the id for each record
> in an array and find out where in the array the current record is. $photo_id
> is fed to this script which tells it which picture to display:
> 
> $x = 0;
> while ($row = mysql_fetch_array($result)) {
> $photo_id1 = $row['photoid'];
> $array[$x] =  $photo_id1;
> if ($photo_id1 == $photo_id) {
> $position = $x;

Thanks a lot, Jeff & Chris.  I'll try it this morning!


mto

-- 

Michael O'Neal
Web Producer/ Autocrosser
ST 28 '89 Civic Si
---------------------
 M   A   N   G   O
B  O  U  L  D  E  R
---------------------
http://www.thinkmango.com
e- [EMAIL PROTECTED]
p- 303.442.1821
f- 303.938.8507


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to